Allegory is a literary or artistic work with a concealed meaning.
- The painting depicts an allegory of sin and redemption.
Analogy is a comparison between different things that have a few things in common.
- They made an analogy between diet and high cholesterol.