Race and sexuality are dramatically different things. Skin color is a coat of paint, but for all intents and purposes the people are the same. Sexuality involves your actions, thoughts and behavior, which is very different and when it comes to a moral code much more important. You can't "not be Chinese" but you can "not sleep with a man" even if you want to.
Now, on a more practical front, I think for the most part old religions have a no-gay stance because it discourages reproduction. Catholics and Muslims have been fighting a battle to out-populate each other for centuries. I think there is also the whole stigma of it not being desirable by a society. Just like people have shunned lepers or other illnesses to prevent them from spreading and wiping out a population, I think society has shunned gay individuals because, again, it's not conducive to re population. If it was genetically encouraged and all the men and women stopped wanting to have sex with each other, a whole society could be eventually erased.
A further issue - with Catholics at least - is that in a time when homosexuals were not overtly accepted in society, much (if not all) of the Catholic hierarchy were gay men. By taking an outwardly anti-gay stance, it discouraged a closer look as to why the religious leaders were a group made exclusively of men and serviced by a constant parade of young boys. A rather excellent smokescreen in a time before modern media could provide a closer look at their sick practices.
That said, I think while many of the older religions have had a functional - if not moral - reason for discouraging gay behavior, much of today's anti-gay stance is purely rhetoric or bigotry. Particularly in the American south, where Christian values are supposedly aligned with pro-handgun and anti-healthcare values, the whole anti-gay thing can be lumped in with other ridiculous but successful attempts to brainwash the voting public.








