Obviously, neither gender nor sexual preference determines musical preference, but here’s my thought regarding the apparent pattern mentioned in the OP:
Perhaps Gay men who like dance music are noticed because gay men + dance music = guys dancing together! For the most part, you’re ONLY going to find gay guys dancing together in gay clubs, so there is an association made between gay guys and dance clubs. (Gay guys who like music but whose musical choice is not conducive to dancing don’t have to congregate in order to enjoy themselves, so no one notices them.) Also, it was illegal for gay men to dance together until quite recently, so I think dancing together is a rare and joyful opportunity to say “We’re here, we’re queer, and we’re having a great time, dammit!” After that, I suspect it just became a cultural thing. If you’re a gay guy, and you’re looking for other gay guys, where else are you going to go but to somewhere you know they’ll be?
Folk music? Well, what can I say? Im a dyke, and I hate it. BUT, once upon a time, when lesbians never saw themselves openly represented in music, in books, or anywhere else in society (except, occasionally, as pathetic and/or dangerous freaks), and they wanted to tell their OWN story in music, folk music was a natural choice. It tells a story, and it is very low tech. All you need is a guitar, if that. And, again, it became a tradition. (FWIW, there have been and are plenty of lesbian punk and rock bands, albeit not in the Top 40.)
At the risk of being accused of sexism, it makes sense: guys expressing themselves with their primarily with their bodies, gals expressing themselves primarily with their words. The fact that the guys are gay guys and the gals are lesbians doesn’t make a difference.
Please don’t bother to point out that women (or womyn, or wimmin, if you prefer) also love their bodies, and also love to dance, and that men are also capable of expressing themselves with heartfelt lyrics (and not just on Broadway). I know. I’m just talking about one possible explanation for how certain things became associated with certain groups.