The speaker of "To Melancholy" imagines that she sees ghosts, "night wanderers," and "phantoms" in the mist over the river. Sounds kinda spooky, doesn't it? She even imagines the ghost of one person in particular—the poet Thomas Otway, who used to live around that area. Maybe she feels haunted by earlier poets, because she feels like she has a lot to live up to?
Eek! The speaker imagines herself being haunted by her literary predecessors like Thomas Otway. She worries that she'll fall short and will not be remembered.
The speaker says that melancholy has a "magic power" in order to explain the apparently paradoxical way that feeling melancholy can also feel "soothing." Eerie stuff. Soothing, but eerie.