An allegory is (often) a (very) extended metaphor:
"allegory (AL-eh-GOR-ee): a narrative that serves as an extended metaphor. Allegories are written in the form of fables, parables, poems, stories, and almost any other style or genre. The main purpose of an allegory is to tell a story that has characters, a setting, as well as other types of symbols, that have both literal and figurative meanings. The difference between an allegory and a symbol is that an allegory is a complete narrative that conveys abstract ideas to get a point across, while a symbol is a representation of an idea or concept that can have a different meaning throughout a literary work. One well-known example of an allegory is Dante’s The Divine Comedy. In Inferno, Dante is on a pilgrimage to try to understand his own life, but his character also represents every man who is in search of his purpose in the world.
.Although Virgil literally guides Dante on his journey through the mystical inferno, he can also be seen as the reason and human wisdom that Dante has been looking for in his life. "
whereas an allusion:
"allusion (a-LOO-zhuhn): a reference in a literary work to a person, place, or thing in history or another work of literature. Allusions are often indirect or brief references to well-known characters or events. Specific examples of allusions can be found throughout Dante’s Inferno. In a passage, Dante alludes to the Greek mythological figures, Phaethon and Icarus, to express his fear as he descends from the air into the eighth circle of hell. He states:
I doubt if Phaethon feared more - that time
he dropped the sun-reins of his father's chariot
and burned the streak of sky we see today -
or if poor Icarus did - feeling his sides
unfeathering as the wax began to melt,
his father shouting: "Wrong, your course is wrong" (Canto XVII: 106-111).
Allusions are often used to summarize broad, complex ideas or emotions in one quick, powerful image. For example, to communicate the idea of self-sacrifice one may refer to Jesus, as part of Jesus' story portrays him dying on the cross in order to save mankind (Matthew 27:45-56). In addition, to express righteousness, one might allude to Noah who "had no faults and was the only good man of his time" (Genesis 6:9-22). Furthermore, the idea of fatherhood or patriarchial love can be well understood by alluding to Abraham, who was the ancestor of many nations (Genesis 17:3-6). Finally, Cain is an excellent example to convey banishment, rejection, or evil, for he was cast out of his homeland by God (Genesis 4:12). Thus, allusions serve an important function in writing in that they allow the reader to understand a difficult concept by relating to an already familiar story."