"Gender" is a stereotype about a sex. That is, gender is the set of characteristics that a group of people ascribe to a sex. Gender, in theory, includes any characteristic; in our culture, gender includes behavior, mannerisms, linguistics, occupation, habits, emotions, thoughts, goals, skills, interests, and identity. A person's gender is not the same as their assigned gender or their gender identity, but they do overlap.
Another way to understand gender is as the sum of a person's gender identity, gender expression, and gender role and compare to the culture's expectation.