In the fairy thread the question is asked about the gender of a fairy. Now when is the work gender used in place of the word sex? I was taught that words have gender and people have sex. Is this use of the word gender a new puritanism?
Traditionally, you're right: gender pertained to grammar, not to biology.
However, social scientists have used the word since the 1950s to refer to sexual identity as a psychological and cultural construct distinct from biological sex (see the relevant Wikipedia article) and it was probably inevitable that outside of academia the word would eventually become a synonym for sex+. Nowadays, any dictionary would give both the traditional meaning of +gender and the new meaning it has acquired during the last half century.

Nowadays, any dictionary would give both the traditional meaning of gender and the new meaning it has acquired during the last half century.
According to the [online version of the Oxford dictionaries|oxforddictionaries.com/definition/english/gender] (if the link doesn't work, go to the main page and make a search for gender), that new+ meaning dates from the same century that the meaning you described as +traditional. I'm not a native English speaker so I can't make any further comment about it.
@rorygemwriter: I think now that zashibis told you the differences between both terms you realize why I used gender instead of sex on that thread (I was the OP) but if you need any further explanation from my part, let me know.

the new meaning it has acquired during the last half century.
I think there's a difference between acquire a new meaning as you said in the quote above and popularize a rarely used meaning that already existed. That's the point I was trying to make on #3.
that new meaning dates from the same century that the meaning you described as traditional.
This is by way of very misleadingly eliding and dismissing the entire point of the Oxford usage note, which goes on to say: "but this did not become common until the mid 20th century. Although the words gender and sex both have the sense ‘the state of being male or female’, they are typically used in slightly different ways: sex tends to refer to biological differences, while gender refers to cultural or social ones."
That the word gender+ can be attested to have been used to mean +sex+ prior to the 20th century isn't at all surprising. The OED's job is to track down the earliest possible citations of even the most uncommon usages. This does not change the fact, however, that its emergence as a popular synonym for +sex is a distinctly 20th century phenomenon. In fact, Google ngram makes it easy to see that is was in the 1970s when the word's popularity really began to soar.
I’ve always assumed that people started using “gender” to refer to the distinction between a man and woman so as not to cause confusion with another, sexier, meaning of “sex”.
If you tell someone you are studying “gender issues”, they will likely understand you. If you say “sexual issues” they could be forgiven for thinking you were studying marital problems.
That Wikipedia article seems to me to give too much credence to feminist theories. If I want to talk about sexual identity I will use the term “sexual identity”. Why hijack an otherwise useful word? Assuming “gender” means “sexual identity”, if you ask a feminist what gender a fairy is she would be forced to admit “I don’t know. You’d have to ask him, her or shim”. Surely most people use the word “gender” as a slightly safer synonym for “sex” and to avoid “Sex? Yes please!” tomfoolery.
From the Wikipedia page:
Sexologist John Money introduced the terminological distinction between biological sex and gender as a role in 1955. Before his work, it was uncommon to use the word "gender" to refer to anything but grammatical categories.
I’m not quite sure if the person who wrote that is saying there’s causation.