Man was made for communion with God and we’re born outside of that relationship, outside of His Kingdom, which is itself a matter of injustice. We’re born lost, in a state known as original sin where the knowledge of God is lost, where we are spiritually separated from Him. As we come to know about God (the knowledge Jesus came to reveal) we may turn to Him in faith, faith in His existence, goodness, and the promises He’s revealed and then in response be baptized as a public expression of that faith which then formally brings us into His kingdom, where the Trinity may now indwell us and justice or righteousness is restored to us. To be justified is to be made right in God’s eyes, and that qualifies us for salvation; we’re no longer lost.
From that point we’re to continue to walk in this state of justice, keeping our baptismal vows, and growing in more justice yet with the new life of grace that God’s indwelling makes present to us. This is called sanctification which is no more than the continued process of justification. We’re expected to “invest our talents”, to take the goodness God has given and continues to give and grow more in it yet as we participate in His work in us. He wants us to increasingly “own” our justice or righteousness, and become holier yet.
If we fall back into sin, especially serious or grave sin that already constitutes a turning away from and rejecting of God and the justice and love He gives us, we can forfeit this state, this relationship, and therefore our salvation. With a new change of heart, however, we can repent and confess our sins and be restored again through the sacrament of Reconciliation.
Justice or righteousness itself is encompassed in the most basic sense in the virtues of faith, hope, and love. Love by itself is the most complete definition of justice or righteousness for man which is why the Greatest Commandments are what they are.