Here is some food for thought from Boston.com News a couple years ago.
male nipples, as virtually all biologists believe, are a mere developmental echo of female nipples - whose purpose in child-rearing is obviousThe article is actually more about female orgasms but I digress.
Men and women for the most part have the same genetic make-up. The primary difference is that men have a Y chromosome and (most)women don't. Both men and women have an X chromosome. Men have nipples because women need nipples. That is the "developmental echo". So why can't you assume that some men love other men because women need to love men (and vice versa)?
So would there be a selective advantage in maintaining "gayness"? There could be or it could be selectively neutral.
People that immediately claim there is no genetic basis for a trait obviously do not understand the complexity of genetics and development. Genetics is a complex business. Is there a "music gene", an "athletic gene"? Unlikely. However there are almost certainly a group of genes that interact with each other and the environment to produce such traits.
You can find a discussion of this topic at adherents.com and here in a review of Jim McKnight's book: Straight Science? Homosexuality, Evolution and Adaption.
A discussion of the development of nipples in utero can be found here. Basically, nipples are formed before sex organs are formed.