A Last Confession" is a love song about the tension between body and soul, but also about the different perspectives two lovers can bring to love and sex.
The first two stanzas speak of a bitter irony. When the narrator meant to give her soul, she found only pain. When she thought she was giving only sex, the lover thought she gave her soul, due to the physical passion.
The last two stanzas establish a comparison. They speak of what will happen after death, when the soul is naked. Then soul will speak to soul directly, and the narrator will be happy. However, Yeats leaves open who the soul will connect with. (God? Jesus? The beloved of misery? The physically beloved?).
(Oh, the "it" in those lines is the soul.)