The abbey is a place of confinement. It's cut off and secluded (hidden away where no one can find it). Beyond that, its doors are welded shut from the inside. Which means everyone's trapped: no one can get in or out. The sense of confinement (a staple of Gothic lit) is crucial to giving the story its "threatening" atmosphere.
Does it mean anything that the place of confinement is a "castellated abbey"? Well, big, dark, gloomy castles are classic settings for Gothic fiction, so there's nothing terribly new there. But you might also think of the abbey as a symbol of worldly power, standing above the peasants who we learn at the beginning are being ravaged by the Red Death. As a castle and an abbey, it could represent both the state and the church. And you might think that makes its fall to the Red Death suggestive of some sort of apocalypse. (There's more on that below.)