During the classic era of the programme, a couple of writers attempted to sell stories with a World War II setting. One was Brian Hayles, and the other was Douglas Camfield. Both stories were turned down as that period of history was deemed too recent, with possibly traumatic memories for viewers, and therefore not suitable ground for a family programme like Doctor Who. (The sitcom Dad's Army almost never made it off the drawing board for similar reasons).
It wasn't until its final year that the war made it into a story, when Ian Briggs gave us The Curse of Fenric. The actual war took place well off screen, as we were on home territory and the story dealt more with the Russians and the potential aftermath of the conflict than it did with the Germans. It could just as easily have been a Cold War story as a WWII one.
The Empty Child / The Doctor Dances can only really be set in World War II, and specifically in the time of the London Blitz, as it relies so much on the imagery of the gas-masked zombies.
There had been a fear of gas attacks on civilian populations in WWI as well, as London did get attacked by early bombers and by Zeppelins.
The fact that May 2005 was the 60th anniversary of VE Day probably also suggested the WWII setting.
Gas mask imagery had featured in the show before, back in a number of stories directed by David Maloney. There's a sudden appearance of a pair of German soldiers in gas masks in Part One of The War Games, the slow-motion massacre of gas-masked Thal soldiers in the opening moments of Genesis of the Daleks, and then we have the sight of a gas-masked soldier and his gas-masked horse in the Matrix in The Deadly Assassin. Other figures in the latter wear darkened goggles which give the appearance of being gas mask-like.
The gas mask gives the appearance of a dehumanised, skull-like visage.
This is Steven Moffat's first ever story for the programme, and - as time will tell - he liked to base his monsters on things which would appear frightening to children. Children themselves can be very creepy if written and directed well.
It was inevitable that Moffat would look to a writer like Robert Holmes, master of Doctor Who Gothic Horror, for some inspiration. Holmes liked to make the everyday scary, and Moffat would pretty much build his entire Doctor Who career around this.
Setting the story entirely at night certainly helps make it spookier, the child's face remains masked, and he only ever repeats the same phrase over and over. Everyone is warned not to let him touch you.
The idea of a catchphrase - "Are you my mummy?" - may have come from writers Bob Baker and Dave Martin, who liked to give their characters such phrases - "Eldrad must live!", "Contact has been made", and "The Quest is the Quest".
Russell T Davies knew that the series was going to end with a battle. The Doctor and Rose could not fight - the former had done so recently but the experience had turned him against violence, whilst the Doctor would not have tolerated the latter had she been someone who would readily turn to violence. A soldier was therefore needed to play a part in this climactic battle - which is where the character of Captain Jack Harkness came in. Even before we start to pick up his backstory we are led to believe that he is an American citizen who has come to the UK to fight, when his own country has yet to even join the conflict. It transpires that this is just a charade, and he has only been on Earth for a short while longer than the Doctor and Rose have.
He mentions the Time Agency, and hails from the 51st Century, so we are in the period mentioned by the Doctor and Magnus Greel in The Talons of Weng-Chiang (Robert Holmes again). Greel had feared being hunted down by Time Agents. Greel was said to have travelled back in time from the year 5000, when there was both a war and another Ice Age.
"Captain Jack Harkness" isn't a million miles away from "Captain Jack Harkaway", mentioned in The Mind Robber.
Star Trek is categorically only a TV show in this universe. "Spock" is a euphemism for technology.
Talking of euphemisms, according to Moffat - and only Moffat - "dancing" equates to sex. Typical of a sitcom writer obsessed with sex to name a whole episode after it.
At the time, John Barrowman's sexuality, and his character's omnisexuality, led to accusations of a "gay agenda" being introduced to the show. This had actually been claimed by the right wing press since the day RTD was announced as the new show-runner.
The name "Chula" comes from an Indian restaurant in Hammersmith where Moffat went for a meal alongside Mark Gatiss, Paul Cornell and Robert Shearman after they got the 2005 writing gig.
This wasn't Moffat's first idea for the series. RTD didn't like the initial pitch and they came up with this story instead.