Under the rule being considered by the city’s [New York's] Board of Health, which is likely to be adopted soon, people born in the city would be able to change the documented sex on their birth certificates by providing affidavits from a doctor and a mental health professional laying out why their patients should be considered members of the opposite sex, and asserting that their proposed change would be permanent. - New York TimesGender and sex are not the same things. There is far too much conflation of sex and gender in the West (and I think this may be one reason why gender reassignment surgery is generally considered to be the solution to having physical characteristics which don't "match" your gender identity - though I wouldn't deny someone that surgery if they really felt it to be necessary).
I prefer the idea that gender is fluid, and is a performance. In fact, many supposed sexual characteristics are socially constructed as well - boys are encouraged to develop their muscles, girls are not, for example).
In many societies, you can be a man who lives like a woman, a woman who lives like a man, or just a gender-blender (consider hijras in India, the berdache, two-spirit etc.)
I am a computer (mainly web) geek, so I work with a majority of male colleagues. Sometimes I am "one of the lads" and sometimes I perform a more female role. Everyone performs a gender role all the time, even when they aren't aware of it (do you sit with your legs open or closed? do you fart? belch? swear? go to the loo with your friends? wear make-up?)
Read the excellent Monstrous Regiment by Terry Pratchett if you don't believe that gender is a performance, and is different from sexual characteristics.
Gender shouldn't be on documents anyway - it's obviously going to be awkward when showing your documents to officials if your apparent gender doesn't match what it says on the paper.
My article Gender and Sexuality in Contemporary Paganisms explores these issues further in the context of Paganisms.