I'm pretty sure I played against a girl. That's at least 40 years ago. I'm amazed anyone is still talking about gender having anything to do with chess.
Chess is old enough that there would've been competitive tournaments for a long time and almost certainly in the times where women were denied a great deal of recognition in most walks of life.
FIDE has had a women's championship almost as long as the men's championship (~1927) The world championship is open to all (although I have not gone digging to find out how long that has been the case...)