Basically, they've been friends a long time, those with transgender identities, and those who are homosexual or bisexual. Trans people are often also homosexual or bisexual, more so than heterosexual (I believe I don't know for sure!!)
When western LGB activism was born, there was no understanding of trans identities, so people drew no distinction between being LGB, and being trans. This led to both groups being subject to the same injustices.
So, much of the discrimination against the two groups is similar, both are often disowned by family and friends, and subject to all kinds of assault. Also, the journey to identifying as trans or as LGB is similar. Both groups have to come out, for example.
Trans identities, and those who are LGB experience similar discrimination, and as such, both groups have had close relations for many years. The 'T' is a part of the LGBT acronym because the trans community is small, and as such, the LGB group, and those who are trans, are better off in safe spaces together. This does not mean that there aren't transphobic LGB people, or that there aren't homophobic trans people.