I bought a gift for my friend who I also have a crush on, he is not aware of this fact
Oh he knows it I would dare to conjecture. On that premise I would suggest to you that the reason he is avoiding you is because he does not want to encourage you.
It is very uncomfortable for someone when a friend has a crush on them and that someone is not interested in a "relationship" with that friend. Your gift to him is simply an unwanted advance.
Given that I no longer want to hand him the gift, but knowing that he is aware that I have bought a gift for him, how do I handle this situation without seeming as though I am ridiculous.
You actually can't without looking a little ridiculous. Because you would still be something less then straight forward about things. It doesn't really matter what you do with the gift. What really matters is whether or not you lay drama on him about what you did with the gift, including if what you did was give it to him. Because what your gift is about (IMHO) is not giving your friend a gift that they will appreciate, but giving a friend a gift so they will notice you and like you more. You're trying to get something for yourself in other words, and your friend may not be feeling "it" with you so there you go.
The gift, it seems to me, is an unwanted advance on your part. Advances are fine, it is how we up the levels of our relationships with people. But when they prove to be unwanted, it's time to let the notion of a more meaningful relationship with someone go. Time to gracefully move on emotionally.
I feel very bad because I put so much effort and money into the gift. what can I do if he now tries to schedule a meeting?*
*this was quoted from OPs original version since edited out.
Considering what I wrote before, this may sound like strange advice. But if you understood what I was trying to convey: You will go and give him the gift. And a hug, and show him that you like him, and have a really great time with him, and who knows where it could go from there. Just get over the BS with him. The reasons he could have been avoiding you are not only what I conjectured before, they could be his shyness about opening up to you or any number of reasons. But whatever the reason, good or bad for you, accept that. If it's bad, he just met to tell you to stay away, own your own emotions about it, don't lay it on him. He would be doing an honorable thing by being honest with you, helping you to resolve this thing, and especially by not taking advantage of you.