Your question refers to the "epiphany" or revelation that Gabriel undergoes at the end of the story. What is key to focus on is how the rest of the story builds up to this moment of revelation or self truth that Gabriel experiences. The trigger for this epiphany comes with Gretta´s narration of her first - and biggest - love with Michael Furey. From Gretta´s description of Michael, their relationship and his death, it is clear that she had a truer and more real love with him than she ever had with Gabriel. Consider her description of Michael as "very delicate" and then such statements as:
-I can see him so plainly, she said after a moment. Such eyes as he had: big dark eyes! And such an expression in them - an expression!
The repetition and amplification of such details as his eyes and expression clearly shows Gretta´s feelings of admiration and love for him. It is important to focus on the impact of this revelation on Gabriel:
Gabriel felt humilated by the failure of his irony and by the evocation of this figure from the dead, a boy in the gasworks. While he had been full of memories of their secret life together, full of tenderness and joy an desire, she had been comparing him in her mind with another. A shameful consciousness of his own person assailed him. He saw himself as a ludicrous figure, acting as a pennyboy for his aunts, a nervous well-meaning sentimentalist, orating to vulgarians and idealising his own clownish lusts, the pitiable fatuous fellow he had caught a glimps of in the mirror.
This revelation therefore ushers in a moment of self-truth for Gabriel, when he realises who he really is and can critically assess his character. He realises that Michael Furey has loved in a way that he has never been able to, and feels immense sadness at this truth. Thinking about his own strictly regimented and controlled life he realises that people like Michael Furey live life more profoundly than he ever has. This causes him to realise that he and all characters are in fact "shadows":
One by one they were all becoming shades. Better pass boldly into that other world, in teh full glory of some passion, than fade and wither dismally with age... 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.
From his point of view the boundary line between the dead and the living is evaporating, and he sees that in some ways he is already a shade. The last sentence suggests a unity between the dead and the living through the snow, which freezes them together in paralysis, cementing this relationship:
His soul swooned softly as he heard the snow falling faintly through the universe and faintly falling, like the descent of their last end, upon all the living and the dead.
Thus the learning in this story is more focussed on what Gabriel learns about himself and his relationships with others. He realises that he has never truly "lived" compared to Michael Furey, and that because of this he is already becoming a "shade" - that the boundary line between the dead and the living is not as impermeable as he thought.