As we all strive to reach the gates of Heaven, sometimes our past sins prevent us from reaching full communion with God upon our death. This doesn't meant that we didn't love God during life, but that we struggled to stay on the road of perfection.
Here is a prayer from the Raccolta that invokes God's mercy upon those souls in purgatory who loved God during life and are drawing closes to his embrace in Heaven.