Allegory is also visible in the character and name of Hester's daughter, Pearl. Hester named her for the bible verse, Matthew 13:45-46, "Upon finding one pearl of great price, he went and sold all he had and bought it." Hester paid a great price for her daughter: her self-respect, her husband, her standing in the community, basically everything. However, Hester was willing to pay that price for Pearl and as a result, Pearl is Hester and Dimmesdale's catalyst for redemption. Pearl will not let her mother renounce the letter when they are standing by the brook with Dimmesdale and she will not come to Dimmesdale willingly until he has stood in public and admitted that hs is her father. Pearl's existence is a gem of great price, but a price the characters are willing to pay in the end.
The allegory of Hawthorne's tale is the letter A itself, which Hester must affix to her clothing so that it is visible at all times.
To be clear, an allegory is a narrative that has both literal and secondary meaning. Literally, the red "A" is a mark of shame; it publicly identifies Hester Prynne as an adulteress. But as the novel progresses, we are able to see that perhaps Hester is singled out because of her honesty and upstanding nature. The A, rather than being a symbol of shame, becomes a symbol of pride in a town full of hypocritical sinners.