CATECHISM OF THE CATHOLIC CHURCH
SECOND EDITION

Paragraphs 312–316

312 In time we can discover that God in his almighty providence can bring a good from the consequences of an evil, even a moral evil, caused by his creatures: "It was not you", said Joseph to his brothers, "who sent me here, but God. . . You meant evil against me; but God meant it for good, to bring it about that many people should be kept alive." From the greatest moral evil ever committed - the rejection and murder of God's only Son, caused by the sins of all men - God, by his grace that "abounded all the more", brought the greatest of goods: the glorification of Christ and our redemption. But for all that, evil never becomes a good.
313 "We know that in everything God works for good for those who love him." The constant witness of the saints confirms this truth:

St. Catherine of Siena said to "those who are scandalized and rebel against what happens to them": "Everything comes from love, all is ordained for the salvation of man, God does nothing without this goal in mind."

St. Thomas More, shortly before his martyrdom, consoled his daughter: "Nothing can come but that that God wills. And I make me very sure that whatsoever that be, seem it never so bad in sight, it shall indeed be the best."

Dame Julian of Norwich: "Here I was taught by the grace of God that I should steadfastly keep me in the faith... and that at the same time I should take my stand on and earnestly believe in what our Lord shewed in this time - that 'all manner [of] thing shall be well.'"

314 We firmly believe that God is master of the world and of its history. But the ways of his providence are often unknown to us. Only at the end, when our partial knowledge ceases, when we see God "face to face", will we fully know the ways by which - even through the dramas of evil and sin - God has guided his creation to that definitive sabbath rest for which he created heaven and earth.
315 In the creation of the world and of man, God gave the first and universal witness to his almighty love and his wisdom, the first proclamation of the "plan of his loving goodness", which finds its goal in the new creation in Christ.
316 Though the work of creation is attributed to the Father in particular, it is equally a truth of faith that the Father, Son and Holy Spirit together are the one, indivisible principle of creation.