http://heralds.ca/blog/temptations/
What are we, or what is our strength, that we should be able to resist so many temptations? asks St. Bernard. And he answers: ‘This was certainly what God intended; that we, seeing our deficiencies, and that we have no other help, should with all humility have recourse to his mercy.’ God knows how useful it is to us to be obliged to pray, in order to keep us humble, and to exercise our confidence; and he therefore permits us to be assaulted by enemies too mighty to be overcome by our own strength, that by prayer we may obtain from his mercy aid to resist them; and it is especially to be remarked that no one can resist the impure temptations of the flesh without recommending himself to God when he is tempted. This foe is so terrible that, when he fights with us, he, as it were, takes away all light; he makes us forget all our meditations, all our good resolutions; he makes us also disregard the truths of faith, and even almost lose the fear of the divine punishments. For he conspires, with our natural inclinations, which drive us with the greatest violence to the indulgence of sensual pleasures. He who in such a moment does not have recourse to God is lost. The only defense against this temptation is prayer, as St. Gregory of Nyssa says: ‘Prayer is the bulwark of chastity;’ and before him Solomon: And as I knew that I could not otherwise be continent except God gave it, I went to the Lord and besought him (Wis 8:21). Chastity is a virtue which we have no strength to practice, unless God gives us; and God does not give this strength except to him who asks for it. But whoever prays for it will certainly obtain it.
St. Alphonsus Liguori, “Prayer, the Great Means of Salvation”