Mr. Hooper comes to church with a black crape veil over his eyes and nose.
Mr. Hooper's veil made the townspeople unsure, and made them feel like they knew their dark secrets and sins. The veil makes him a better priest because people think he knows their sins.
Mr. Hooper's fiance leaves him when he refuses to take off the veil, even for her. He continues to wear the veil for years after she leaves.
On his death bed, Mr. Hooper or Father Hooper, refuses to take off the veil. "Then deem mea monster, for the symbol beneath which I have lived, and die! I look around me, and, lo! on every visage a Black Veil!” (Hawthorne)
Father Hooper died with a smile on his face after he revealed the truth about everyone having veils.
Father Hooper was buried with the veil on his face.
I think that this was a good ending for this story because it showed that everyone has sinned, and the people of the town alienated him for something that they all metaphorically have.