Why do guys fear that if they put effort into dancing, or just let themselves go, that they'll be perceived as gay? -- and so, better to not dance at all, or to paper over their insecurity by goof dancing, like they're too cool to care.
"But gay men are better dancers, so girls will infer that I'm gay!" No they won't. Gay men are a tiny fraction of the male population -- maybe 3% -- so they're unlikely to be found anywhere. And anyway, girls can tell pretty well if a guy is straight or gay.
Try an analogy: are you afraid to speak to girls? After all, gay men are more likely to be outgoing and loquacious, so wouldn't chatting them up make you look gay? You have nothing to fear because if you aren't gay, you won't talk gay. The way you dance is hardly any different -- guys tend to dance like guys, while gays tend to dance like girls. You don't have to worry about any particular move consciously, any more than you would have to worry about any particular vocal inflection -- straight guys' voices simply cannot be perceived as gay voices. They're so naturally distinct.
Most guys can't dance, but you have no way of knowing until you try. And dancing ability isn't a black-or-white thing; you may be better than you think. If you have always been a drummer or tapper, you can probably keep good enough rhythm that you'll do fine in a dance club. I didn't know I could dance until I was 24, when "Take Me Out" really got me going. Before then, just the thought of dancing paralyzed me. Of course, early on I had an out -- there wasn't any good dance music in the mid-1990s, so at school dances you didn't stick out by not dancing, and they played enough Nirvana or Green Day that you could still bounce around head-banging to get the energy out of your system.
As an extreme example of how little you have to worry about: say you're in a dance club and it's '80s night, they're playing "Oh L'amour" by Erasure, you're dancing fairly energetically in one of those cages, and you have a pretty boy face. Every one of those things should lead girls to conclude you're gay, right? Heh, again remember that if you're not gay, you won't act gay -- in speech, movement, or whatever. I hardly got started when four college cuties ran up the steps to pour into the cage and started humping me from all four sides.
They weren't drunk, and they weren't slutty either (for one thing, they were cute, and it's usually the plain-looking girls who have to compete on other dimensions who are slutty). They simply got turned on by male confidence and energy. It's no different from groupies rushing the stage to crowd around a lead singer, or spilling onto the field to cling to the star athlete. Fretting about what they're going to think kills your confidence, so stop worrying -- they're not going to think you're gay.
Actually, there is one thing you shouldn't do, but which I see all the time, among the younger and thus more insecure guys anyway -- never, ever "back it up" into a girl's lap. Guys think they're being ironic and cool with this gender-reversal stuff, but it just plants the seed in her brain that you're the feminine one and she's the masculine one. A veneer of androgyny is OK if it suits you, like glam rock -- but those guys weren't confused about whether men or women had balls, and they were more piggish than gender-egalitarian.
I have no idea why this practice is so common. I guess they haven't had enough time to figure out how destructive it is of their goals, and how emasculating it looks. When you're an emotional wreck at that age about what other people are going to think about you, it feels safer to go the ironic route -- you have plausible deniability if you look foolish. All right, but why go so far as to make yourself the girl? You bend her over -- not the other way around. Seriously, what do they teach kids in sex ed these days?