Not neccessarily. Humans are social creatures, our genes' survival is not solely dependent on our individual ability to pass them on, since we share genes with our siblings and parents as well as offspring. For example, families with some non-reproducing offspring may fair better due to having a higher adults/children ratio.
If such a gene existed (which perhaps it doesn't), it might benefit families who had members carrying it.
This is the same reason some species have evolved alarm-calling when a predator is nearby. It benefits the collective (who share the gene), but at an obvious detriment to the individual's ability to pass on their genes in this case.
In addition, one suggestion is that a possible “gay gene” would be something that causes extremely strong attraction to men in both men and women with that gene. Women with this gene would then be more likely to father children, which could counter the evolutionary pressure resulting from the male offspring with that gene not having any offspring.
(I’m massively oversimplfing of course, my bio knowledge is fairly limited).
In my EvoBio class a decade ago, my professor told us the theory that homosexuality could be adaptive based on birth order because it would reduce fraternal rivalry: the family would have an additional adult to care for the young without being a reproductive competitor.
This doesn't make much sense, though. Every additional human is a very expensive investment of time, resources, and effort on the family, and offers no material return on investment for at least a decade in terms of productivity. True, while the gay son might not produce offspring to compete with his brother's kids, it also means he brings no additional mate and offspring to help out the family.
If such a gene existed (which perhaps it doesn't), it might benefit families who had members carrying it.
This is the same reason some species have evolved alarm-calling when a predator is nearby. It benefits the collective (who share the gene), but at an obvious detriment to the individual's ability to pass on their genes in this case.