I don't like dictionaries, I like research.
Merriam-Webster 2018 says, sense 1 abc [gramatical gender] but sense 2 is all about sex.
>2a SEX ...
>2b the behavioral, cultural, or psychological traits typically associated with one sex
http://web.archive.org/web/20181125203538/https://www.merria...
it doesn't mention gender identity, but gender identity is a perfectly good word for gender identity.
I don't have access to the OED here but I'm sure we'd see a similar timeline.