Is it sinful to have gay thoughts?

To answer this question from a Biblical perspective, we need to turn it into several questions:

What is sin?

At a basic level, sin is going our own way instead of God's way. It is worshipping things and people rather than God. It is relying on myself and my wisdom and resources, rather than on God who is the giver of life and of all good things. It is deciding that I know better than God, who is all-knowing and created me. It is rebelling instead of following. In a daily and practical sense, the sin of "going our own way" appears as doing things that are wrong, not doing the things that we know we should do, and trusting in ourselves or others instead of God.
Is it a sin to be sexually involved with someone of the same sex?

The Bible quite clearly says that there is only one place for sexual involvement: in a life-long, exclusive marriage commitment between one man and one woman. Anything else - pre-marital sex, sex outside of marriage, sex between two people of the same gender, sex with more than one person, etc. is a sin.
Is it a sin to engage in sexual fantasies about others of the same-sex?

Jesus spoke of sexual fantasies, saying that God considers using your imagination to fantasize about sexual activities to be the same as actually committing those sexual activities. So sexual fantasy is wrong, no matter who or what you are fantasizing about. God desires us to live in reality and be led by the Spirit. Fantasy moves us into the unreal. 
Is it a sin to experience same-sex attraction?
No. From a Biblical perspective, it is not a sin to want to do something that the Bible forbids; it is only a sin to act on what you want - to do it. This principle can be applied to many things. Whether you experience sexual attractions to the same sex or to the opposite sex, the Bible draws a distinction between experiencing attractions and what you do (in real life and in your imagination). Attractions are not sinful. The Bible does say that we will experience attractions to do sinful things. And it warns us not follow any such attractions into sinful actions.
We recognize the difference between being tempted occasionally and being regularly tempted to act on an attraction that one feels most of the time. In both cases, God has something for you. He offers you transformation and empowerment to live beyond your attractions, to choose differently. For more thoughts on this, please look in our articles section.

If God doesn't change me after I pray, does that mean He created me gay?

There have been many people in the Bible who have waited on God for years for the answer to their prayers. Abraham didn't see God's promise to him come to pass until he was almost 100 years old. The Bible says that while he waited a long time for this, he was "fully persuaded that God would do what he promised" (Romans 4:12).

To be more direct, however, the answer to your question is no. Just because a person prays "to be straight" or to be "changed to a heterosexual" but sees no change is not an indication that God has created someone homosexual.

Often we find people are confused about what to pray for and the results they expect. In James 4:3, we are told that when we pray selfish, carnal prayers which are out of line with the will of God, we are praying "amiss". In other words, God does not want just your sexuality, he wants all of you. He has always been concerned with the total restoration of people, not just compartments of a person's life. There are plenty of heterosexuals who do not know God. His purpose is not to change your sexuality, but change your life. Remember the goal is not heterosexuality, it is holiness.

Another area of confusion can be illustrated by analogy. Consider a teen who comes home from school and tells his mother that he is hungry. But it is not yet time for dinner. Wanting to respect his mother yet struggling with his appetite, he goes to his room and prays that God will take away his appetite. No matter how earnest his prayers, he finds God does not take away his appetite. Now he struggles with confusion about why God does not answer his prayer. Being hungry and needing to eat is part of the way God made people. God will not, indeed can not, take away his hunger. But what God can do is lead him in satisfying his hunger in a godly way and developing the capacity to wait. In the area of sexual appetites and needs, God wants to enable people to satisfy their deeper needs in Godly ways rather than using sex and sexuality in ungodly ways to try to meet these needs. When you pray that God will take away your unwanted same-sex attractions without praying that God will lead you to understanding and then satisfying the deeper needs within you, then you are asking God to do something inappropriate. God wants to restore all of you. As we said above, His purpose is not to change your sexuality, but change your life.

You cannot seek God on your own terms. This is what has created a misguided sense of alienation from God in many gays who claim to have tried prayer to be straight but found it useless. Although the sincerity of the seeker may be 100% true, the manner in which one approaches God is important.

Anyone who comes to God must believe that he is and that he is a rewarder of those who diligently seek him. Heb 11:6

We suggest that you offer all of yourself to God. If I were you I would say, "Lord take all of me, I'm yours completely. Wash me completely and renew a right spirit within me". We believe that if you pursue him with all your heart, you will not be dissapointed.

For I know the plans that I have for you declares the Lord, plans to prosper you and not to harm you, plans to give you a hope and a future. Then you will call upon me and come to me and pray to me and I will listen to you. You will seek me and find me when you seek me with all your heart. Jeremiah 29:11-13