An epiphany is a mental and spiritual experience in which a person has an impressive new understanding of life and/or of himself. It is like a religious experience and always contains what seem like profound insights.
In James Joyce's "The Dead," the protagonist Gabriel Conroy spends a rather dull evening at a birthday party for an old woman. The party seems to symbolize his entire mediocre and pointless existence. That night in bed with his wife he experiences an epiphany in which he thinks about the universality and inevitability of death. The whole story is leading up to this beautiful conclusion which contains some of James Joyce's finest, most poetic writing, including the following:
His soul had approached that region where dwell the vast hosts of the dead. He was conscious of, but could not apprehend, their wayward and flickering existence. His own identity was fading out into a grey impalpable world: the solid world itself, which these dead had one time reared and lived in, was dissolving and dwindling.
That quote is a good example of an epiphany. They are usually memorable experiences and often represent turning points in people's lives. They seem to come unsought, probably from deep in the unconscious.
An epiphany in literature is a sudden moment of truth or illumination, when a lightening bolt of realization hits a character. It's the "ah-ha" moment when the character suddenly "gets" something that was eluding him, such as "It's not Mary I am in love with, it's the security her wealthy family represents." This moment of truth changes everything for the character. Its name comes from the moment of truth or epiphany the three wise men experienced when they visited the baby Jesus.
Gabriel has several epiphanies or new realizations at the end of the story. He suddenly learns for the first time that his wife loved someone before him, the young and bold Michael Furey. This leads him, all of a sudden, to see himself in a new, lesser light:
"A shameful consciousness of his own person assailed him. He saw himself as a ludicrous figure, acting as a penny-boy for his aunts, a nervous, well-meaning sentimentalist, orating to vulgarians and idealizing his own clownish lusts, the pitiable fatuous fellow he had caught a glimpse of in the mirror. Instinctively he turned his back more to the light lest she might see the shame that burned upon his forehead."
He is displaced from his own place as the center of the universe by his wife's revelation. Then, thinking about the dead Furey, he realizes that they are all getting older, closer to death. This new realization or epiphany about mortality comes to him as he watches his wife's face and admits to himself she is no longer the beautiful young person Furey loved. He imagines Aunt Julia dying. He realizes that he has never loved anyone as fully as Furey loved his wife. He decides, having fully realizing that they are all dying, that it is better to live "boldly" than fade away. He thinks about mortality as the snow falls on all of them, living and dead. In the end, he accepts his epiphany about mortality and his own insignificance in the scheme of things (a burst of humility) and thinks about the snow falling on all of them, living and dead.