Voting Democratic doesn't mean you support every plank of Democratic policy. The Democratic party consists of three main wings in an uneasy coalition:
The traditional white working class: in favour of economic redistribution by strong unions, high taxes and strong social safety nets. However they are socially conservative; they oppose gay rights and are at best ambivalent about liberal abortion and policies to reduce racial inequality. This group used to be the backbone of the Democratic party, especially in the South, but Nixon's Southern Strategy peeled many of them away and even more have now gone over to Donald Trump.
Black people: strongly in favour of policies to reduce economic and racial inequality. This overrides their unease at liberal abortion laws and gay rights.
The Brahmin Left: wealthy people with University degrees, mostly white. Strongly in favour of gay liberation, liberal abortion laws, reduction in economic and racial inequality, rapid reduction in greenhouse gas emissions, and pretty much every other leftish cause you can think of.
The Brahmin Left have always had an outsize influence due to their education, money, spare time and concentration in the cities. Their numbers are growing thanks to the spread of University education, which tends to make people more liberal. This leads to tension between the socially progressive views of the Brahmins and the socially conservative views of the rest of the party. Gay rights are simply one aspect of this tension.
As with my previous portrait of the Republicans, this is a very broad-brush approximation. There are lots of people who sit somewhere in between these three poles, and others who don't really fit the model at all. In particular, its perfectly possible to be black and in favour of gay rights. Its just not part of the traditional thinking of that wing of the party.