Gender identity is how people describe themselves. So, the term gender is filled with all sorts of social customs.
Sexual orientation is about whom one is attracted to.
You can be female and feel male and be attracted to either men or women. You can be male and feel male, but be attracted to men. And you can be female, feel female and be attracted to women. Cross-dressing, that is, dressing as the opposite sex, can also cut across categories. For some straight men, dressing as a woman may be erotic.