"For man it is impossible; but for God all things are possible."
Matt 19:26, Luke 1:37, Jeremiah 32:27, Genesis 18:14
If God doesn't answer our prayers in the way we think He should it doesn't mean He can't grant our request; it means that God is saying "No" or "not right now" or perhaps something is blocking the power of God and needs to be removed. It doesn't mean that He doesn't care or that He doesn't want us to be happy.
The Bible, the Old Testament but especially the New Testament, is filled with illustrations of how much God loves us. When we look at the intricacy and complexity of all of God's creation, from the tiniest molecule to the vast universe, it's kind of silly to even imagine that God, who created all this and keeps it in motion, cannot grant our little request. So that tells us that there's some other reason why our prayer is not being answered as we would like it to be.
The Book of Job in the Bible is an excellent answer to why God seems not to answer some prayers. Chapters 38-41 are God's response to Job trying to figure out why he has been subjected to such awful suffering. It can be summed up by saying "If you cannot understand God's creation, how can you hope to understand why God doesn't answer our prayers in the way we would like Him to ."
With God all things are possible. We just have to continue to pray, trust in our all-powerful God and follow the guidance of the Holy Spirit for our lives.