Brannon Braga has worked on Star Trek in some capacity for 15 years, from an intern on The Next Generation in 1990 to the executive producer of Enterprise when it ended in 2005—and he regrets that in all of those years, the series never had a gay character.
Speaking with AfterElton, Braga said:
It was a shame for a lot of us that ... I'm talking about the Next Generation, Deep Space Nine and there was a constant back and forth about well how do we portray the spectrum of sexuality. There were people who felt very strongly that we should be showing casually, you know, just two guys together in the background in Ten Forward. At the time the decision was made not to do that and I think those same people would make a different decision now because I think, you know, that was 1989, well yeah about 89, 90, 91. I have no doubt that those same creative players wouldn't feel so hesitant to have, you know, have been squeamish about a decision like that.
Sadly, Braga admits, "It was not a forward-thinking decision." Considering that Star Trek is set in the future, admitting a lack of forward thinking is acknowledging a job poorly done.
AfterElton even pointed out that Gene Roddenberry told The Advocate in 1991 that The Next Generation would show gay characters on the U.S.S. Enterprise. However, Roddenberry died that year, and no subsequent Star Trek producer made good on Roddenberry's promise.
There have only been two cases where Star Trek has taken on the topic of homosexuality, both in The Next Generation. In the first ("The Host"), Beverley Crusher falls in love with Odon, a Trill host, but when the symbiont is placed in a woman's body, she calls off the relationship. In the second ("The Outcast"), Will Riker falls for Soren, an androgynous person who illegally identifies as female ... but the relationship ends when she is forced into "psychotectic" treatment.
If you want to know more about the love lives of Star Trek characters—and really, who doesn't?—Wikipedia has an entry dedicated to Sexuality in Star Trek.