A story or arrangement of narration that works on two levels.

“Psyche, moved by the fear of the unknown, lit the forbidden lamp in her bedchamber banishing her husband cupid.”

“Gilgamesh, falling asleep on his return from the end of the world, was robbed of the plant that granted eternal life by a snake.”

For examples of this in literature, read Ovid in the Metamorphoses, Dante in La Divina Comedia, or Aesop, perhaps even The Song of Songs.

Allegorical meaning has been considered part of the medieval method of biblical hermeneutic.