Unlike Protestants, who misunderstand Scripture's teaching about justification and confuse things by separating justification and sanctification, the Catholic Church has always recognized that in Scripture, justification and sanctification are two ways of speaking about the same thing. You cease to be justified when you cease to be sanctified. Unfortunately, this scheme is a legal fiction. Most Fundamentalists go on to say that losing ground in the sanctification battle won't jeopardize your justification. Calvin taught the absolute impossibility of losing justification.
Catholics see it differently, of course.
If you sin grievously, the supernatural life in your soul disappears, since it can't co-exist with serious sin. You then cease to be justified. If you were to die while unjustified, you'd go to hell. But you can become re-justified by having the supernatural life renewed in your soul, and you can do that by responding to the actual graces God sends you. It's enough to get you into heaven, but it may not be enough to sustain itself.