No. 1461 and 1462, page 357 and 358 of the Catechism of the Catholic Church: The Celebration of the Christian Mystery; Chapter Two - The Sacraments of Healing; Libreria Editrice Vaticana: Urbi Et Orbi Communications:
Forgiveness of sins brings reconciliation with God, but also with the Church. Since ancient times the bishop, visible head of a particular Church, has thus rightfully been considered to be the one who principally has the power and ministry of reconciliation: he is the moderator of the penitential discipline. Priests, his collaborators, exercise it to the extent that they have received the commission either from their bishop (or religious superior) or the Pope, according to the law of the Church.
From the Baltimore Catechism No. 3; Benziger Brothers, Inc. and Tan Books and Publishers, Inc. Nos. 737, 738 and 740, page 153 and 154.
Q. Is it true man cannot forgive sins?
A. If one means that he cannot forgive them by his own power, that is true; however, one is wrong if one means that he cannot forgive sins even by the power of God, for man can do anything if God gives him the power. The priest does not forgive sins by his own power as man, but by the authority he receives as the minister of God.
Q. How do the priests of the Church exercise the power of forgiving sins?
A. The priests of the Church exercise the power of forgiving sins by hearing the confession of sins, and granting pardon for them as ministers of God and in His name. 
Q.Could God not forgive our sins if we confessed them to Himself in secret?
A. Certainly, God could forgive our sins if we confessed them to Himself in secret, but He has not promised to do so; whereas He has promised to pardon them if we confess them to His priests. Since He is free to pardon or not to pardon, He has the right to establish a Sacrament through which alone He will pardon.