How on earth did you get that? I thought you said you had actually studied and understood the Catechism. Obviously you hadn't. The Catechism teaches:
The term "merit" refers in general to the recompense owed by a community or a society for the action of one of its members, experienced either as beneficial or harmful, deserving reward or punishment. Merit is relative to the virtue of justice, in conformity with the principle of equality which governs it.
With regard to God, there is no strict right to any merit on the part of man. Between God and us there is an immeasurable inequality, for we have received everything from him, our Creator.
The merit of man before God in the Christian life arises from the fact that God has freely chosen to associate man with the work of his grace. The fatherly action of God is first on his own initiative, and then follows man's free acting through his collaboration, so that the merit of good works is to be attributed in the first place to the grace of God, then to the faithful. Man's merit, moreover, itself is due to God, for his good actions proceed in Christ, from the predispositions and assistance given by the Holy Spirit.
How does one earn grace if it is unmerited (unearned, undeserved ) favor?