Urgh, my least favorite TOS episodes rear their ugly heads. Turnabout Intruder with its notorious line about females not being good enough to qualify as starship captains and Space Seed with that idiot who was completely infatuated with Khan and betrayed her ship and superior officers for his sake.
And let's not forget Captain Pike's wonderful line in The Cage about not being used to having a woman on the bridge.
That being said, let's also remember that TOS was a product of its time, and whatever the personal beliefs of individual writers, story editors, producers, directors, actors, etc...ultimately in order to keep the show on the air, they had to make sure that a 60's TV audience would accept and understand the stories.
I'm not defending some of these attitudes, I'm just being realistic about a 1960's TV show.
It was a huge thing just for their to be women on the ship at all, when the viewing public was used to war movies where the only women were the wives/girlfriends of the leads, or at best, nurses in the base hospitals.