There are many characters in Doctor Who who show a romantic/sexual interest in characters of the same gender or of both genders. Jack Harkness is probably the most prominent character who would fit the LGBT category, although by his time, the 51st century, such categories are essentially meaningless. ("The Empty Child"/"The Doctor Dances", "You people and your quaint little categories" -- Jack Harkness, while discussing sexuality "Day One" (Torchwood story))
The Victorian-era characters Vastra and Jenny Flint, who are the same gender but different species and are (or, at least, consider themselves to be) married, would also qualify. ("I'm a Lizard Woman from the Dawn of Time, and this is my wife." -- Vastra speaking of herself and Jenny in "The Snowmen") In "Deep Breath" and the online minisode "Demons Run: Two Days Later" the fact Jenny is lesbian is discussed.
Some other characters who fit the 21st century LGBT definition would include Sky from "Midnight", Oswin Oswald from "Asylum of the Daleks", and Alonzo from "Voyage of the Damned"/"The End of Time", though Alonzo wasn't revealed to be LGBT until the latter episode when he was paired up romantically with Jack Harkness.
In Series 9, two episodes dropped hints that Clara Oswald might be bisexual owing to her claiming to have kissed Jane Austen and later teasing a character by saying re: Austen, "I love her: take that how you like", however the writers and actress Jenna Coleman have stated that this was intentionally left ambiguous and open to interpretation. ("The Magician's Apprentice", "Face the Raven"). The Doctor himself may also be bisexual/omnisexual, depending on which stories you count as 'canon'. This is most prominent in the Eighth Doctor Adventures novels.
Bill Potts, introduced in "The Pilot" is the first confirmed fully gay/lesbian companion in televised Doctor Who (Jack was bisexual - or omnisexual- but rejected that label, because he didn't believe in those 'quaint little categories').
The T in LGBT stands for "transgender" and it has been established that at least some Time Lords are "technically" this, given that some have changed gender as a result of regeneration. Known examples are The Corsair ("The Doctor's Wife", The Master a.k.a. The Mistress/Missy ("Dark Water", et al), and The General ("Hell Bent"). That said, The General states outright that she considered herself a woman but was stuck with a man's body for one regeneration, which technically disqualifies her from the spirit of LGBT. Missy, on the other hand, has displayed open attraction to the Doctor in her female form ("Death in Heaven" and in "Deep Breath" she refers to him as her "boyfriend"), and hints of attraction by The Master in his male form towards the Doctor can be detected as early as his first appearances in 1971. It has not, however, been established as yet whether Time Lords themselves equate the ability to change gender as a whole to trans.
Otherwise, it is harder to determine whether any characters in Doctor Who identify themselves as trans as to date no storyline has come along in which this is a plot point.
LGBT characters aren't restricted to the new series from 2005 onward. For example, in "Damaged Goods" (Virgin New Adventures novel), companion Chris Cwej has a relationship with another man, and explains (much like Jack Harkness would later on TV) that in his future time, labels like LGBT are irrelevant because everyone's sexuality is whatever they want it to be.
In the classic TV series, there are no characters explicitly revealed to be LGBT, only subtle hints in a few cases, such as the lesbian subtext in the relationship between Ace and Karra in "Survival". However, "No Future" (Virgin New Adventures novel) and "Happy Endings" (Virgin New Adventures novel) retroactively claimed Captain Mike Yates of UNIT to be gay, although there's no mention of that in his televised episodes, which would make him the earliest LGBT companion, and possibly the earliest LGBT character.