Fundamentally, there is little difference between the meaning of the terms. Both terms refer to the condition of being male or female. There is a slight difference in their uses. The term "gender" is used in English grammar to indicate "classification of nouns, pronouns, adjectives, and, in some languages, verbs that may be arbitrary or based on characteristics such as sex or animacy and that determines agreement with or selection of modifiers, referents, or grammatical forms." For example, the pronoun of "he" is used to describe a male gendered antecedent, while "she" would be used in female gendered antecedents. In these settings, the term "gender" is used over the term "sex." The other difference between the two is that one of the terms can be used as a verb that carries with it different implications than the other term.
In the English language, these terms tend to be used interchangeably. There is little difference in how they are used. Either refers to the male or female. There is, however, according to the rules of the English langauge, a difference in how they SHOULD be used. The term "gender" is used in English grammar to indicate a classification between the male and the female or people, animals, and other living beings.For example, the pronoun of "he" is used to describe a male gendered animal, while "she" would be used in female gendered animals. We may ask someone what sex they are. We classify animals by their sex, but politely classify human beings by their gender.Simply put, it is more appropriate and polite to ask a person to indicate their gender, rather than their sex.
Sex is more often used in its verb form to denote an action undertaken by animals of both genders.
I teach a Sociology class and the analogy that helps most is the following:
Sex refers to the hardware a person is born with, the parts and chemicals that make us men or women. Gender is the software program that society installs into us to teach us to act like men or women.
Sex is inherited, gender is learned.
In sociology, sex refers the the actual physical identity of a person; either male or female according to genitals.
Gender refers to a person's emotional identity. It also includes the norms of behavior for a person of that sex. It is possible for a person's sex and gender to disagree; hence, transgendered people. For example, a person could be born with male genitalia but their gender identity could be female; thus, making them transgendered.