The title of this episode, "A Study in Sherlock," is a play on the title of the first-ever story by Sir Arthur Conan Doyle to feature Sherlock Holmes, "A Study in Scarlet."
When Murdoch and Julia are walking through the the street, discussing "Sherlock Holmes", they pass a theatre sign advertising a production of The Importance of Being Earnest at the Shaftesbury Theatre. Shaftesbury is the name of the company that produces Murdoch Mysteries.
The basic notion behind the plot - which concerns a mental patient who insists that he is actually Sherlock Holmes and refuses to accept that Holmes is a fictitious character - is taken from James Goldman's play, "They Might Be Giants", and to its film adaptation They Might Be Giants (1971).
The pipe that "Holmes" smokes is a curved Calabash pipe. It appears nowhere in the Conan Doyle stories. Doyle describes all three kinds of pipes, smoked by Holmes, in great detail. However, many actors who have played Holmes used the curved Calabash because it allowed for easy speech with the pipe in the mouth. Most notably by William Gillette, who portrayed Holmes over 1,300 times.
This episode takes place in 1900.