God doesn't hate anyone. God is all love, or more accurately all Love is God, as God is the source of all love.
So God doesn't hate gays.
As for why there are gay people even though being gay is a sin, you could easily ask the same as why are their horny people if sex outside of marriage is a sin? Theologically they are the same sin after all: sodomy is sex outside of marriage without the purpose of procreation, the only major difference is gays can't go through marriage.
The answer is that any such sin is reducing oneself to base pleasures, desires of this world, of the flesh. People aren't "gay people," simply people who are sexually attracted to those os the same sex. One would hope this is not the sole thing which defines them. Sex is an act solely reserved for married couples, an expression of love from which new life springs. To use it in any other way perverts this act. By reducing oneself to such base pleasures and succumbing to the desires of the flesh, one courts Satan in perverting the acts intended nature, turning away from God, and to turn away from God is the very "definition" of sin.
Almost all people are born with struggles, as we have become imperfect through our own acts in original sin. Some are gay, some are gluttons, some are pridful, some are bloodthirsty killers. Gays aren't unique in this regard. If one gives up these human desires and serve God, we are rewarded with eternal life. If not, we are sent to hell, an act of love by God, as He freely denies Himself and His desire to be with us, and lets us go where we may acts as we desire, yet He forewarns us of agony as the soul knows only anguish without God.
God loves us all, but we must conform to Him, not Him to us, for if He was to change He would not be God. (Since one of God's traits is Immutability)