Gender is a social construct largely defined by the way someone chooses to express themselves.
Gender is how we view a person. For instance, if I walk up to a person, I probably won't be able to tell their sex unless they are breaking some sort of law. However, I probably will be able to identify their gender in most cases.