Where sin has perverted the social climate, it is necessary to call for the conversion of hearts and appeal to the grace of God. Charity urges just reforms. There is no solution to the social question apart from the Gospel (cf CA 3, 5).
Source: Catechism of the Catholic Church (Vatican.va)