I tend to try to deal with socially awkward situations using humor. It's a self-defense mechanism designed to prevent escalation in otherwise tense situations. So, when a well-meaning co-worker commented that my success as a woman in a male-dominated industry is a great testament to my capabilities, I replied that the real heroes are all the left-handed people who have succeeded despite their obvious disadvantages.
This response was obviously not delivered in seriousness, nor was it designed to be a constructive mechanism for dealing with the misunderstanding. The idea that the original comment could be misconstrued as an assumption that I must be 'better than average' as a woman in order to succeed among men probably didn't occur to the person who said it. The idea that this statement would be very awkward if applied to a racial minority probably didn't register, either. Likewise, issuing a reminder that my chosen profession has less to do with my sex than with my interests could have been offputting and taken as an unwarranted defensive reaction. But, while humor builds an interpersonal bridge in response to this misunderstanding, it doesn't resolve anything.
But, I am frustrated for my male colleagues who have been told that their failure not to single out my sex during meetings is a gross breach of professional etiquette in the world of modern gender politics. The obligatory "and gal, sorry about that, Heather" is intensely frustrating to me. Not only have I now been singled out to be stared at like an obscure specimen in a jar, but you are left to feel awkward about whether or not you and I are square. The positive side of this is, perhaps this awareness of my sex forces you to challenge unconscious biases that may exist.