Not in the human sense of gay and lesbian, as far as I know. There was a TNG episode, The Host. Beverly Crusher I think, she was caring for a trill that she cared for as a man, but the trill became a woman. There was also a DS 9 episode with one of Kirzon's former lovers, who was a woman. There were others about androgenous people, a woman who could become "the perfect mate," Vulcan love, stuff like that.