At birth the decision of sex is based on the appearance of the genitalia. And once sex has been assigned it is expected that we will remain in that sex until we die. There is something essential in our relationship with sexual identification. As we go through life we may forget a person's name, we may even forget their face but we never forget the sexual category they were assigned at birth. However, because sex is decided on the basis of the genitalia, and as exposure of this area is not a method of disclosure which is encouraged in social situations, then we need other clues to decipher identity.
Gender consists of expectations and attributes.
We expect each sex to conform to the appropriate gender identity and we attribute the appropriate gender identity to each sex. So far, so good. We talk so much about self esteem, self confidence, self assurance, that is it easy to take for granted the assumption that we are in control of our own identity, that how we decide to present ourselves to others is our own choice. It is only when we transgress into the foreign territory of a gender identity which does not align with the appropriate sexual identity as expected that we realise we actually have very little control of it at all. It's a bit like a game.