2 Corinthians 12:7-9, “And lest I should be exalted above measure through the abundance of the revelations, there was given to me a thorn in the flesh, the messenger of Satan to buffet me, lest I should be exalted above measure. For this thing I besought the Lord thrice, that it might depart from me. And he said unto me, My grace is sufficient for thee: for my strength is made perfect in weakness. Most gladly therefore will I rather glory in my infirmities, that the power of Christ may rest upon me.”

The Apostle Paul was used mightily of the Lord.  He was given divine revelations that he passed on to us in his epistles.  Something like this could surely cause a person to be proud of what the Lord was doing through him.  Paul was not immune to pride, so the Lord gave Paul “a thorn in the flesh…lest I be exalted above measure.”  The Lord actually blessed Paul with an infirmity because it was given to him to accomplish a good purpose…to keep Paul humble.  Pride will surely destroy one’s ability to faithfully serve the Lord.  Proverbs 16:18 tells us that, “Pride goeth before destruction, and an haughty spirit before a fall.”  We also read in Proverbs 29:23 that, “A man’s pride shall bring him low: but honour shall uphold the humble in spirit.” 

When Paul received this infirmity, he prayed three times that the Lord would remove it from him.  It was good that Paul prayed, for he later tells us, “Casting all your care upon him; for he careth for you.” (1 Peter 5:7).  However, as Paul prayed for the Lord to remove his thorn, the Lord spoke to him saying, “My grace is sufficient for thee: for my strength is made perfect in weakness.” (verse 9).  The Lord, in effect, was telling Paul that he had God’s grace and that was all he really needed.  Paul learned this valuable lesson and ceased praying for this infirmity to be removed. 

We learn from this that sometimes it is the Lord’s will that we suffer.  It is often through sufferings that we learn our most valuable lessons.  That is the grace of God in action…giving us what we need even when we do not understand what He is doing. 

But let’s look specifically at your question: Can God’s grace keep us from sinning? We read in Psalm 119:11, “Thy word have I hid in mine heart, that I might not sin against thee.”  This shows our strength to resist sin is dependent upon our reading, learning, and hiding (treasuring) God’s Word in our hearts.  The power to resist sin comes from knowing and following God’s Word.  Galatians 5:16 says, “This I say then, Walk in the Spirit, and ye shall not fulfil the lust of the flesh.”  When we live in dependence and obedience to the Word of God and are led by His Spirit, we will not live to satisfy our fleshly, sinful nature.  Our desire will be to honor and live for the Lord. 

Certainly, learning about God’s wonderful grace, will give us the desire to resist sin.  The more we realize the love of God, shown to us by His unlimited grace, the more we will want to please Him.  When we understand and appreciate the grace of God that has saved us and keeps us, we will have the desire and power to do what is right, to resist temptation, to overcome obstacles and to be able to live for Him and serve Him.  We read in Romans 6:1-2, “What shall we say then? Shall we continue in sin, that grace may abound? God forbid. How shall we, that are dead to sin, live any longer therein?”  (429.6)