Work as if everything depended on you; pray as if everything depended on God.
Attr. to St. Augustine. Also to St. Ignatius of Loyola. And to Martin Luther.
A generic Google turned up the usual fluff, but it also found the quotation attributed to St. Ignatius in CCC 2834, footnoted as “Attributed to St. Ignatius Loyola, cf. Joseph de Guibert, SJ, The Jesuits: Their Spiritual Doctrine and Practice, (Chicago: Loyola University Press, 1964), 148, n. 55.” That’s scarcely a primary source. But I got to wondering what the Latin text of the CCC gives as a citation, and it gives a better one: “Dictum sancto Ignatio de Loyola attributum; cf Petrus de Ribadeneyra, Tractatus de modo gubernandi sancti Ignatii, c. 6, 14: MHSI 85, 631.” [Saying attributed to St. Ignatius of Loyola; cf. Peter of Ribadeneira, Tract on the method of governing of Saint Ignatius.]
Peter of Rebadeneira was one of the early Jesuits, well-acquainted with St. Ignatius, and the first person to write a biography of him. I can’t locate an online copy of the work in question, but I’m willing to call this one for St. Ignatius pending further information.
2018 Edit: In his book What the Saints Never Said, Trent Horn gives the quotation from Peter of Rebadeneira:
In matters which he took up pertaining to the service of our Lord, he made use of all the human means to succeed in them, with a care and efficiency as great as if the success depended on these means; and he confided in God and depended on his providence as greatly as if all the other human means which he was using were of no effect.