The story is set in the 1870s, in London, England. The city, the buildings, and the people (whether servants, working-class, or educated) are all historically consistent. The reader gets the distinct impression that the author may have walked streets like these, with foot traffic at any and all hours as people of nearly every living standard go about their business and leisure. He may have visited houses and buildings like those he describes, some showing improvements and social advancements, others neglect and decay.
The only fantasy element in the story is in the nature of Dr. Jekyll’s research with mineral salts. This too is actually historically consistent, as the science of pharmacology was expanding at that time. While the doctor’s bag in the 1880s contained no more potent substances than alcohol, iodine, and opium, there was study being made of the efficacy of other medicinal substances. Studies by private researchers brought ether, for example, into medical use though it was not always handled with appropriate discretion.