After finding a dead scientist wearing a teddy bear costume Steed says "Alas, poor teddy", from "Alas poor Yorick" in Hamlet.
When Sir August appears before the Council of Ministers to make his demands, he starts off by saying "Now is the winter of your discontent", from Gloster's line in Richard III: "Now is the winter of our discontent".
The endless stair Mrs. Peel tries to descend during her drug-induced nightmare was clearly inspired by the works of the artist M. C. Escher.
After finding two dead scientists wearing bear suits Steed says "The teddy bears are having a picnic." This refers to the song "Teddy Bears' Picnic''.
When Steed and Mrs. Peel see the two bearsuit-wearing villains split up, Mrs. Peel says "I'll take the high road" and Steed says "And I'll take the low road.", a reference to the Scottish song The Bonnie Banks o' Loch Lomond.
While Steed and Mrs. Peel are in the escape pod Steed says "The owl and the pussycat went to sea, in a beautiful pea-green boat.", from the Edward Lear poem.
The original TV series:
The sequence where Mrs. Peel finds herself unable to escape the mansion is strongly reminiscent of the episode "The House That Jack Built."