He gives her his own heart.
Kairi, as a Princess of Heart, had lost hers, and without it she could not live. Sora's sacrifice restores her — but the act turns him into a Heartless. He is only able to return to himself because Kairi reaches him, and her light is what pulls him back.
It is the emotional pivot of the first game: the rescue works, at a cost, and the cost is undone by the very person he saved.