“The Raven” is set in the “chamber” of the narrator—an unnamed scholar—and the entirety of the story unfolds within this room. It is set sometime in the middle of the night (the poem opens “on a midnight dreary”) but continues for a dream-like and indefinite amount of time, although presumably during the same night. No era is specified, but presumably it is contemporary to the Gothic period in which Poe writes (roughly the mid-18th through the mid-19th centuries).
Indeed, the entirety of the setting is established in terms that closely adhere to the tenets of the Gothic genre: the timing of the narrative in the middle of the night complements the Gothic preoccupation with the dark of night as a source of unsettling activity and supernatural power. At the same time, Poe’s decision to confine the narrative to a single room introduces an element of claustrophobia that enhances the nightmarish quality of the narrative—a quality often explored in the then-emerging horror genre that Poe himself helped to invent.