Greg Cox wrote:
Bingo. It originally aired on October 27 and was clearly intended as a fun Halloween romp--written by the author of PSYCHO, no less.
Right. Robert Bloch was known as a horror/fantasy writer, and "Catspaw" is very loosely inspired by a prose story Bloch wrote called "Broomstick Ride," which is summarized here
It's worth remembering that part of Roddenberry's original pitch for the series was that it would feature parallel worlds that resembled cultures from Earth history, thus enabling the production to save money by reusing existing props, costumes, set pieces, and stock footage from historical shows/films rather than having to spend money creating entirely alien settings every week. So a lot of episodes started with the idea to replicate some Earthly culture or setting, and then a justification was made up for it. Let's do a space gangster episode so we can use stuff from The Untouchables
! The excuse? Oh, let's say they're very imitative and some old ship left them a book about gangsters. Let's do an episode about Indians in space! The excuse? Let's say they were transplanted by some mysterious ancient race we'll never mention again. Let's do space Nazis! The excuse? Let's say an Earth historian altered their culture. Although Roddenberry himself was content to treat parallel cultural evolution as a spontaneous happenstance in his own scripts, as in "Bread and Circuses" and "The Omega Glory."
So the idea behind "Catspaw" was to do a Halloween episode that would let them use a castle set and medieval sorcery trappings and whatnot, and the excuse they came up with was an alien expedition studying humanity by accessing the racial subconscious and its primal fears.