From Vatican II until today, several documents of the Magisterium — and especially The Catechism of the Catholic Church — have confirmed the teaching of the Church on homosexuality. The Catechism differentiates between homosexual acts and homosexual tendencies.
Regarding acts, it teaches that, in Sacred Scripture, these are presented as grave sins. Tradition has constantly considered them to be intrinsically immoral and contrary to natural law. These, consequently, may not be approved in any case.
Concerning profoundly deep-rooted homosexual tendencies that one discovers in a certain number of men and women, these are also objectively disordered and often constitute a trial, even for these men and women. These people must be received with respect and delicacy; one will avoid every mark of unjust discrimination with respect to them. These are called to realize the will of God in their lives and to unite to the Sacrifice of the Lord the difficulties that they may encounter.
In light of this teaching, this department, in agreement with the Congregation for Divine Worship and the Discipline of the Sacraments, holds it necessary clearly to affirm that the Church, while profoundly respecting the persons in question, may not admit to the seminary and Holy Orders those who practice homosexuality, show profoundly deep-rooted homosexual tendencies, or support the so-called gay culture.
From a 2005 Vatican document on homosexuals and seminaries