Between gender and sex (and sexual orientation), things just keep getting more and more complex. Sort of like … well, reality.
A good article (drawing heavily from a 2015 review of the science behind all this at http://www.nature.com/news/sex-redefined-1.16943). The main take-away: the idea of monolithic, black-and-white definitions of what a person's sex actually is based on "what are their X and Y chromosomes) is oversimplified in meaning, in what parts of the body one looks at, and in what one is actually looking at in the first place.
Basic binary descriptions may have a utility (that's why they were invented in the first place), but we're discovering over and over again that utility has strict limitations that can, in fact, be highly misleading. And, ultimately, it's as oversimplified as saying "what color is her hair?" or "is he an adult or a child?" or "what's that person's race?"
Sex Biology Redefined: Genes Don’t Indicate Binary Sexes | Scope Blog