As a setting, the dungeon is particularly apt for the Gothic aesthetic. First, it is a subterranean space, which is ideal for the overwhelming sense of confinement described by Frederick S. Frank as the first rule of the Gothic. Possibly more importantly, however, dungeons allow the entrapment of the characters, which is one of the most terrifying and repetitive tropes of the Gothic.
Source: Frank, Frederick S. The First Gothics : A Critical Guide to the English Gothic Novel. New York : Garland Pub., 1987. Print.