There is a serious problem with keeping the law, and St. Paul himself wrote quite candidly concerning it:
We know that the law is spiritual; but I am unspiritual, sold as a slave to sin. I do not understand what I do. For what I want to do I do not do, but what I hate I do. And if I do what I do not want to do, I agree that the law is good. As it is, it is no longer I myself who do it, but it is sin living in me. I know that nothing good lives in me, that is, in my sinful nature. For I have the desire to do what is good, but I cannot carry it out. For what I do is not the good I want to do; no, the evil I do not want to do - this I keep on doing. Now if I do what I do not want to do, it is no longer I who do it, but it is sin living in me that does it.
So I find this law at work: When I want to do good, evil is right there with me. For in my inner being I delight in God's law; but I see another law at work in the members of my body, waging war against the law of my mind and making me a prisoner of the law of sin at work within my members. What a wretched man I am! Who will rescue me from this body of death? Thanks be to God - through Jesus Christ our Lord! (Romans 7:14-24a,NIV)
What St. Paul described is now called paradoxical intention, and if you are a human being, you are afflicted with it. Psychologists recognize it as a powerful force affecting everything that we say and/or do, and even have to arrange the treatment of their patients so as to account for it. There's also an old saying which describes it and its results: "The harder you try, the faster you fail." Whatever we try to do, we will fail to accomplish. Either it comes as part of our nature, or it will fall victim to this quirk in our psyche.
But what we cannot change through trying, God himself has been able to change through giving us an entirely new nature:
So I say, live by the Spirit, and you will not gratify the desires of the sinful nature. For the sinful nature desires what is contrary to the Spirit, and the Spirit what is contrary to the sinful nature. They are in conflict with each other, so that you do not do what you want. But if you are led by the Spirit, you are not under law.
The acts of the sinful nature are obvious: sexual immorality, impurity and debauchery; idolatry and witchcraft; hatred, discord, jealousy, fits of rage, selfish ambition, dissensions, factions and envy; drunkenness, orgies, and the like. I warn you, as I did before, that those who live like this will not inherit the kingdom of God.
But the fruit of the Spirit is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness and self-control. Against such things there is no law. Those who belong to Christ Jesus have crucified the sinful nature with its passions and desires. Since we live by the Spirit , let us keep in step with the Spirit. Let us not become conceited, provoking and envying each other. (Galatians 5:16-26,NIV)
Have you ever heard the saying, "He did all the right things, but for all the wrong reasons"? It applies to us as Christians. Not only are we to do what is appropriate for Christians, but we are also to do it for the appropriate reasons. That means that not only are our words and actions to be in accordance with God's will, but the underlying motives behind those words and actions are also to be in accordance with God's will.
And there's only one way to accomplish that, just as there is only one salvation. And that way is to have God himself, through his Spirit, subdue what up until then has been our natural way of being, and then replace what he has subdued with a new nature (the fruit of the Spirit). It is this new nature that enables us to say and do what God truly wants of us, because it is the 'fruit' of this new nature that provides the proper impetus for our speaking and performing as God would have of us. So long as we have those 9 'fruit' as the point of origination for all that we say and do, we have assurance that what we are saying and doing is conforming to God's will ("Against such things there is no law" Galatians 5:23b). We are to see them as the 'borders' within which all that we say and do must have its beginning if it is to be seen as being 'in synch' with what God himself wants of us.
And how do we obtain 'the fruit of the Spirit'? We obtain it by sincerely and humbly accepting God's gift of salvation. It all begins there. We cannot buy it as an asset, or earn it as a salary. Instead, we must accept it while seeing it as yet another gift which God has seen fit to give us, not because we deserve it, but because of his own compassion towards us.