In ancient Egypt (Middle Kingdom, 2000-1800 BCE), there were said to be three genders of humans: men, sekhet, and women, in that order. Archaeologists differ about the meaning. Sekhet is usually translated as "eunuch," but that's likely an oversimplification, and there's little evidence they were castrated. It may also mean cisgender gay men, in the sense of not having children. Although we aren't sure of the definition, it was nonetheless a separate category of gender.