Some of the elements in "William Wilson" by Poe, which is categorized as an allegorical parable, that classify it as of the Gothic tradition have to do with setting, characters, and psychological aspects. Gothic stories traditionally take place in old ruined abbeys or castles, but as the Gothic genre expanded, any old, dark mysterious building, like Eton or Oxford, might do instead of a castle or abbey.
The Gothic genre is also defined by the presence in the character list of ghosts, doppelgangers (a counterpart of a person), or phantoms. The eerie namesake, with the face identical to William's own, certainly qualifies as a Gothic doppelganger, and his haunting comings and goings fill the definitive requirement for hauntings or other spiritual and supernatural activity.
Motifs that are requisite in Gothic genre works are death and blood to accompany the supernatural. The final scene certainly fulfills this requirement. The psychological factor driving the characters in Gothic stories is often represented by fear, terror and dread, as is the case in "William Wilson."