Edgar Allan Poe's 1844 story "The Purloined Letter" is one of three of his tales to feature the detective C. Auguste Dupin. While Poe is best-known for stories that belong to the horror genre, this is a mystery story, and many see it as the precursor to the modern detective story, which really came to fruition with Sir Arthur Conan Doyle. Poe was writing at a time when genres were not as hard and fast, so may not have been thinking about the distinctions. While it certainly has much in common stylistically with his other work, its subject matter (the stolen letter of the title) is quite different and distinctive.
Dupin, in fact, is the opposite of many of his protagonists, who often exhibit mental instability, if not outright madness. Just think of the narrator of "The Tell-Tale Heart" for example. Dupin is cool, rational, and deliberate by contrast. What the story does have in common with his horror stories is his use of exotic/foreign settings (Paris), his careful plotting, and his heavy writing style, which often employs foreign or unfamiliar words in a way to seem either timeless or archaic.
You could perhaps make an argument for the atmosphere of the story as some Gothic elements, but I think it's a stretch. "The Purloined Letter" stands apart from many of his stories as a distinct entry and, some might argue, the beginning of a new genre. Poe called it "perhaps the best of my tales of ratiocination," while radical French critics like Lacan and Derrida found new levels in what seems like a straightforward story of detection.