The phrase "the lamplight gloated o'er" is an example of personification.
In literature, personification is the attribution of a personal nature or human characteristic to something non-human. In the phrase, a lamplight is gloating, which, according to the dictionary, is to "dwell on one's own success or another's misfortune with smugness or malignant pleasure." Clearly, a lamp cannot gloat, hence it is being personified.