sex: biological characteristics that identify individual organisms as male or female; also the act of sexual intercourse

gender (in relation to people): socially constructed roles, behaviours and activities associated with males and females, individually or in a group

The couple knew that the baby was female. [sex]
The girls laughed in a very feminine way. [gender]

Whereas the characteristics of sex do not differ substantially between cultures, the characteristics of gender may differ greatly between cultures and between individuals within a culture.

gender (in relation to language): term used in languages (e.g. French, German, Spanish) in which nouns can take a different definite article to distinguish them as masculine, feminine or neuter. This use of the word is much older than its use in relation to maleness and femaleness in people