It is worth reading Dr. Luther at some length on this perennial struggle:
"With the words, ‘walk by the Spirit’ (Gal. 5:16), Paul shows how he wants his earlier statements to be understood: ‘Through love be servants of one another’ (Gal. 5:13), and ‘Love is the fulfilling of the Law’ (Rom. 13:10). It is as though he were saying: ‘When I command you to love one another, I am requiring of you that you walk by the Spirit. For I know that you will not fulfill the Law. Because sin clings to you as long as you live, it is impossible for you to fulfill the Law. But meanwhile take careful heed that you walk by the Spirit, that is, that by the Spirit you battle against the flesh and follow your spiritual desires.’ Thus he has not forgotten the matter of justification. For when he commands them to walk by the Spirit, he clearly denies that works justify. It is as though he were saying: ‘When I speak about the fulfilling of the Law, I do not intend to say that we are justified by the Law. But what I am saying is that there are two contrary guides in you, the Spirit and the flesh. God has stirred up a conflict and fight in your body. For the Spirit struggles against the flesh, and the flesh against the Spirit. All I am requiring of you now — and, for that matter, all that you are able to produce — is that you follow the guidance of the Spirit and resist the guidance of the flesh. Obey the former, and fight against the latter! Therefore when I teach the Law and urge you on to mutual love, do not suppose that I have retracted the doctrine of faith and am now attributing justification to the Law or to love. What I mean to say is that you should walk by the Spirit and not gratify the desires of the flesh.’
"Therefore Paul uses his words with precision and care, as though he were saying: ‘We have not yet attained the fulfillment of the Law. Consequently, we must walk and be exercised by the Spirit, so that we think, say, and do what is of the Spirit and resist what is of the flesh.’ This is why he adds: ‘And do not gratify the desires of the flesh.’ It is as though he were saying: ‘The desires of the flesh are not yet dead, but they always sprout up to talk back and fight back against the Spirit.’ No saint has a flesh so holy that when it is offended it would not rather bite and devour or at least subtract something from the commandment of love. Even at the first impact he cannot restrain himself from irritation with his neighbor, a desire for revenge, and hatred for him as though he were an enemy — or at least less love than he should have according to this commandment. This happens even to saints.
"Therefore the Apostle has established this as a rule for the saints: that they should be servants of one another through love, that they should bear one another’s weaknesses and burdens (Gal. 6:2), and that they should forgive one another’s trespasses (Matt. 6:12–15). Without such clemency and gentleness it is impossible for peace and concord to exist among Christians. It is unavoidable that you are offended frequently and that you offend in turn. You see much in me that offends you; and I, in turn, see much in you that I do not like. If one does not yield to the other through love on matters like this, there will be no end to the argument, discord, rivalry, and hostility. Therefore Paul wants us to walk by the Spirit, so that we do not gratify the desires of the flesh. It is as though he were saying: ‘Even though you are aroused to anger or envy against an offending brother or against someone who does something unkind to you, still resist and repress these feelings through the Spirit. Bear with his weakness, and love him, in accordance with the command: "You shall love your neighbor as yourself." For your brother does not stop being your neighbor simply because he lapses or because he offends you, but that is the very time when he needs your love for him the most.’
"The sophists interpret ‘the desires of the flesh’ as sexual desire. It is indeed true that every godly person, especially one who has not yet attained maturity or who lives a celibate life, is subject to sexual desire. So corrupt and unsound is our flesh that not even married people are free of sexual desire. Whoever examines his feelings carefully will discover that he likes the form or the manner of some other woman more than he does his own. One grows tired of one’s lawful wife and loves a woman who is forbidden to him. In everything it happens this way: What a man has, he despises; what he does not have, he loves. ‘Of things most forbidden we always are fain: And things most denied we seek to obtain.’ Thus I do not deny that the desires of the flesh include sexual desire. Yet it includes not only sexual desire but also all the other evil emotions with which godly people are burdened, though some more violently than others, such as pride, hatred, greed, impatience, etc. In fact, a little later Paul enumerates among the works of the flesh not only these coarse vices but also idolatry, party spirit, and the like (Gal. 5:20), which are emotions that have a better reputation. Thus it is clear that he is speaking about the whole desire of the flesh and the entire realm of sin, which struggles against the realm of the Spirit in the godly, who have received the first fruits of the Spirit (Rom. 8:23). And so he is speaking not only about sexual desire or pride but also about unbelief, distrust, despair, hatred, contempt for god, idolatry, heresy, etc.
"It is as though Paul were saying: ‘I am writing that you should love one another. You do not do this, nor can you do it; for you have the flesh, corrupted as it is by evil desire, which not only arouses sin in you but is itself a sin. Otherwise, if you had perfect love, no sorrow or misfortune would be great enough to disturb it; for it would be spread throughout your body. No wife would be too ugly for her husband to love her intensely and to lose all interest in other women, even the most beautiful ones. This does not actually happen.
"‘Therefore it is impossible for you to be justified by love. Do not think, therefore, that I am retracting my doctrine about faith. Faith and hope must remain, so that we may be justified by the former and encouraged by the latter to persevere in adversity. Finally, we are servants of one another through love, because faith is not idle even though love is tiny and weak. Thus when I command you to walk by the Spirit, I make it abundantly clear that you are not justified by love. Moreover, when I say that you should walk by the Spirit and should not obey the flesh or gratify the desires of the flesh, I am not requiring of you that you strip off the flesh completely or kill it, but that you restrain it. God wants the world to endure until the Last Day. This cannot happen unless men are born and reared; and this, in turn, requires that the flesh continue, and consequently also that sin continue, since the flesh cannot be without sin. And so if we look at the flesh, we are sinners; if we look at the Spirit, we are righteous. We are partly sinners and partly righteous. Yet our righteousness is more abundant than our sin, because the holiness and the righteousness of Christ, our Propitiator, vastly surpasses the sin of the entire world. Consequently, the forgiveness of sins, which we have through Him, is so great, so abundant, and so infinite that it easily swallows up every sin, provided that we persevere in faith and hope toward Him.’
"Paul is writing this Epistle not only to hermits and monks, who lead a celibate life, but to all Christians . . . to the church catholic and to all the faithful. They are the ones whom Paul exhorts to walk by the Spirit in order not to gratify the desires of the flesh, that is, to restrain not only the coarse drives of the flesh, such as sexual desire, anger, impatience, but also the ‘spiritual’ ones, such as doubt, blasphemy, idolatry, contempt and hatred of God, etc. He does not demand of the faithful that they completely destroy and kill their flesh, but that they control it in such a way that it will be subject to the Spirit. In Romans 13:14 he commands us to make provision for the flesh. For just as we should not be cruel to other people’s bodies or trouble them with unjust requirements, so we should not do this to our own bodies either. According to Paul’s command, therefore, we should make provisions for our flesh, to enable it to bear the requirements of both the mind and the body; yet he wants us to make provision for it to meet its needs, not ‘to gratify its desires.’
"Thus if your flesh becomes lascivious, repress it by the Spirit. If it persists, get married! ‘It is better to marry than to be aflame with passion’ (1 Cor. 7:9). When you do this, you walk by the Spirit; that is, you follow the Word and will of God. As I have said, this commandment about walking by the Spirit pertains not only to hermits and monks but to all the faithful, even if they are not aflame with passion. Thus a prince walks by the Spirit when he does his duty diligently, rules his subjects well, punishes the guilty, and defends the innocent. His flesh and the devil oppose him when he does this, and they urge him to start an unjust war or to yield to his own greedy desires. Unless he follows the Spirit as his guide and obeys the Word of God when it gives him correct and faithful warning about his duty, he will gratify the desires of the flesh.
"‘For the desires of the flesh are against the Spirit, and the desires of the Spirit are against the flesh; for these are opposed to each other, to prevent you from doing what you would’ (Gal. 5:17). Here Paul impresses upon us that we are to be conscious of the desires of the flesh — not only of sexual desire, that is, but of pride, anger, sadness, im-patience, unbelief, etc. But he wants us to be conscious of them in such a way that we do not give in to them or gratify them, that is, that we do not say and do what our flesh impels us to do. Thus when it impels us to anger, we should ‘be angry’ in such a way that we ‘sin not’ (Psalm 4:4). It is as though Paul wanted to say: ‘I know that your flesh impels you to anger, envy, doubt, unbelief, and the like. But resist it by the Spirit, so that you do not sin. But if you forsake the guidance of the Spirit and follow the flesh, you will gratify the desires of the flesh, and you will die’ (Rom. 8:13). Thus this statement is to be understood as applying not only to sexual desire but to the whole realm of sin.
"This passage shows clearly that Paul is writing this to the saints, that is, to the church which believes in Christ, which is baptized, justified, and regenerated, and which has the forgiveness of sins. Yet he also says that it has a flesh which battles against the Spirit. He speaks about himself the same way elsewhere: ‘I am carnal, sold under sin’ (Rom. 7:14); again: ‘I see in my members another law at war with the law of my mind’ (Rom. 7:23); and again: ‘Wretched man that I am!’ (Rom. 7:24). Here not only the sophists but even some of the fathers exert themselves anxiously to make excuses for Paul; for they regard it as unworthy of a ‘chosen instrument’ of Christ (Acts 9:15) to say that he was sinful. We for our part give credence to Paul’s words when he candidly confesses that he is sold under sin, is a captive of sin, has a law at war with himself, and serves the law of sin with his flesh.
"Here they reply that the Apostle is saying these things in the name of the wicked. But the wicked do not complain about their rebellion, conflict, and captivity to sin; for sin has powerful dominion over them. Therefore these complaints really belong to Paul and to all the saints. Thus it is not only unwise but even wicked when they make the excuse that Paul and other saints have no sin. For with this notion, which is derived from their ignorance of the doctrine of faith, they have deprived the church of great comfort, have done away with the forgiveness of sins, and have made Christ useless.
"Hence Paul is not denying that he has flesh and the faults of the flesh when he says: ‘I see in my members another law.’ And so it is not incredible that at one time or another he experienced sexual desire. Yet it is my opinion that it was successfully checked by the many great trials of mind and body with which, as his epistles show, he was continually being disciplined and troubled. Or if in a light and vigorous mood he became conscious of sexual desire, anger, or impatience, he resisted them by the Spirit and did not permit these feelings to control him. Therefore let us by no means permit such silly glosses to rob us of these extremely comforting passages, in which Paul describes the conflict going on between the flesh and the Spirit in his own body. The sophists and the monks have never experienced spiritual trial. The only battle they have ever carried on has been to repress and overcome sexual desire. This victory made them so proud — although in fact they never managed to control their desire — that they regarded themselves as far better and saintlier than married people. I am not even speaking about the horrible sins of every kind which they nurtured and strengthened by this false appearance: party spirit, pride, hatred, contempt for their neighbor, trust in their own righteousness, presumption, neglect of godliness and of the Word, unbelief, blasphemy, and the like. Against these sins they did not battle; in fact, they did not even think of them as sins. They supposed that righteousness lay only in the observance of their foolish and wicked vows, and that unrighteousness lay in the neglect of those.
"But we declare it as a certainty that Christ is our principal, complete, and perfect righteousness. If there is nothing on which we can depend, still, as Paul says, ‘these three abide: faith, hope, love’ (1 Cor. 13:13). Thus we must always believe and love, and we must always take hold of Christ as the Head and the Source of our righteousness. ‘He who believes in Him will not be put to shame’ (Rom. 9:33). In addition, we should take pains to be righteous outwardly as well, that is, not to yield to our flesh, which is always suggesting something evil, but to resist it through the Spirit. We must not be broken up with impatience at the ingratitude and contempt of the rabble, who abuse Christian freedom; but by the Spirit we must overcome these and all other trials. To the extent that by the Spirit we struggle against the flesh, to that extent we are outwardly righteous, even though it is not this righteousness that makes us acceptable in the sight of God.
"Therefore let no one despair when he feels his flesh begin another battle against the Spirit, or if he does not succeed immediately in forcing his flesh to be subject to the Spirit. I, too, wish that I had a firmer and more steadfast spirit, one that could not only despise the threats of tyrants, the heresies planted by the fanatical spirits, and other offenses and tumults which they stir up, but could quickly shake off the fears and sorrows of the mind and could even get rid of its fears of the sharpness of death to receive it as a most welcome guest instead. ‘But I see in the members of my body another law at war with the law of my mind’ (Rom. 7:23). Other men struggle with lesser trials, such as poverty, dishonor, impatience, and the like.
"No one should be surprised or frightened when he feels this conflict of the flesh against the Spirit in his body, but he should fortify himself with these words of Paul: ‘The desires of the flesh are against the Spirit,’ and ‘These are opposed to each other, to prevent you from doing what you would’ (Gal. 5:17). With these statements he is comforting those who are undergoing trials, as though he were saying: ‘It is impossible for you to follow the Spirit as your guide through everything without some awareness of hindrance by the flesh. Your flesh will be an obstacle, the sort of obstacle that will prevent you from doing what you would. Here it is sufficient if you resist the flesh and do not gratify its desires, that is, if you follow the Spirit rather than the flesh, which is easily disturbed by impatience, which seeks revenge, grumbles, hates, bites back, etc.’ When someone becomes aware of this battle of the flesh, he should not lose heart on this account; but by the Spirit he should fight back and say: ‘I am a sinner, and I am aware of my sin; for I have not yet put off my flesh, to which sin will cling as long as it lives. But I will obey the Spirit rather than the flesh. That is, by faith and hope I will take hold of Christ. I will fortify myself with His Word, and thereby I will refuse to gratify the desires of the flesh.’
"It is very useful to the faithful to know this doctrine of Paul well and to meditate on it, because it gives wonderful comfort to them in their trial. When I was a monk, I used to think that my salvation was undone when I felt any desires of the flesh, that is, any malice or sexual desire or anger or envy against any of my brothers. I tried many methods. I made confession every day, etc. But none of this did any good, because the desires of the flesh kept coming back. Therefore I could not find peace, but I was constantly crucified by thoughts such as these: ‘You have committed this or that sin; you are guilty of envy, im-patience, etc. Therefore it was useless for you to enter this holy order, and all your good works are to no avail.’ If I had properly understood Paul’s statements, ‘The desires of the flesh are against the Spirit,’ and ‘These are opposed to each other,’ I would not have tortured myself to such a point but would have thought to myself, as I do nowadays: ‘Martin, you will never be completely without sin, because you still have the flesh. Therefore you will always be aware of its conflict, according to the statement of Paul: "The desires of the flesh are against the Spirit." Do not despair, therefore, but fight back, and do not gratify the desires of the flesh. Then you will not be under the Law.’
"I remember that Staupitz used to say: ‘More than a thousand times I have vowed to God that I would improve, but I have never performed what I have vowed. Hereafter I shall not make such vows, because I know perfectly well that I shall not live up to them. Unless God is gracious and merciful to me for the sake of Christ and grants me a blessed final hour when the time comes for me to depart this miserable life, I shall not be able to stand before Him with all my vows and good works.’ This despair is not only truthful but is godly and holy. Whoever wants to be saved must make this confession with his mouth and with his heart" (Lectures on Galatians, Luther’s Works, Volume 27, CPH 1963).