An allegory is a narrative in which every literal element has a symbolic meaning.
To add, an example of an allegory in literature is The Lion, the Witch, and the Wardrobe by C.S. Lewis is the religious allegory with Edmund as Judas and Aslan as Christ