For an overview of all the aspects of gender in this sense of the word, see Gender 101.
It also is used in the context of:
- connectors in electronics and plumbing
- pronouns in English
- nouns in many languages
- Less common uses include Gender of tonalities and Voice (grammar)
- Dictionary.com has a good explanation under "Usage note", starting with: "Although it is possible to define gender as “sex,” indicating that the term can be used when differentiating male creatures from female ones biologically, the concept of gender, a word primarily applied to human beings, has additional connotations—more rich and more amorphous—having to do with general behavior, social interactions, and most importantly, one's fundamental sense of self."