I have been reading some of Gregory the Great’s dialogues with his deacon, Peter. In Dialogue 41 from Book 4, Gregory is discussing Purgatory and states at the end, “In this connection [with venial sins, I think] we should also remember that in the world to come no one will be cleansed even of the slightest faults, unless he has merited such a cleansing through good works performed in this life.”
I don’t quite understand Gregory’s use of merit in this sense. As far as I know if someone dies in God’s grace, but has venial sins on them, God will purify them, before allowing them to enter Heaven. I don’t see where the merit or the good works, in this sense, completely falls in line with the doctrine of Purgatory.