Being a female, it is only right that I begin by discussing our obligations. First, as difficult as it is to admit, trying to force a guy to dance against his will is probably as rude as his refusing to dance even when there is a huge majority of women. Hinting, meaningfully glaring, threatening, and outright asking a man to dance are not only extremely unladylike, but also very unlikely to change his mind. Suck it up, ask another girl to dance, and try not to let anyone see that you're on the verge of tears from having to dance the male part in every single dance. If two girls are dancing together (or actually, in any case, since otherwise the man should always do the asking), the asker should lead. No matter which part is yours, try to be as grateful to your partner as if you were dancing with your desired partner (i. e. an actual guy). If you are set to dance with another girl, and a man asks you to dance, no matter how tempted you are to accept (and you will be), politely refuse. You are already committed, and changing your mind would be extremely rude to your partner. If you are dancing the lead, act like a gentleman! Smile, instead of looking like you'd much rather be dancing a woman's part, with a male partner (even though you would), and when the dance is over, thank you partner and escort her off of the dance floor. Basically, show a good example to all of the guys, who should be doing what you're doing. If a man does ask you to dance, congratulations! Behave with poise and grace, and avoid making any jabs about how rare it is.
Men, if you are in a situation where dancing is going on, and you are not dancing, then unless the number of men and women dancing is right about even (unlikely), rest assured that every girl present wants to wring your neck. We don't even really care that much if you dance with us specifically. If you dance with any girl, that's one guy closer to an even ratio. However, we would still like to dance with an actual male person ourselves at some point, so don't just dance with the girls you know well! Remember what I said about either dancing or having your neck wrung? Well, if you dance twice with the same girl you're making every girl that hasn't yet gotten to dance with a guy (especially if they've had to lead every time) want to wring your neck and then throw you into a lake with sharp rocks at the bottom, with a millstone tied around that scrawny little worthless wrung neck of yours. Look around for girls that aren't dancing much (they'll be the ones sitting or standing and looking wistfully at the dancing from time to time) or are dancing with other girls a lot, especially in the capacity of doing a man's job (they'll be the ones trying to be very gentlemanly and dignified, but all the time feeling just like crying), and ask those girls to dance. They will be grateful to you forever. However, while you ought to be looking for ignored girls to dance with, while dancing, the majority of your attention ought to go to your partner. Eye contact is of vital importance, as is grip, and conversation is nice too, but only if you can both converse and keep up with the dance. When the dance is over, thank your partner, and escort her off of the dance floor. Even if you don't, she will be thrilled to have danced with you, but will still be left with the faint impression that you are an impolite slob, and you would probably rather not leave that impression.
For both men and women, the same principle applies here as in every other situation: conduct yourself with decorum, as a lady or a gentleman, and try to make the experience pleasant for your partner. I hope this has been helpful for any readers there may be. Now go dance your feet off!
Added note, as of 6/10/2014: I was recently introduced to a problem I hadn't thought of before. Men, if you are in a conversation with two girls, and ask one to dance, and she declines, ask the other girl to dance! You'd think this would just be common sense/common courtesy, but apparently not. Rest assured, if you don't do this, the girl you didn't ask (and probably the one you did ask) will notice, and it will not reflect well on your character.