Generally, Rome did not regularly struggle against barbarians. The relatively few barbarian victories tend to get more press than the more usual Roman wins. By barbarian I mean anyone who wasn't civilized. Do not infer that barbarians were stupid, naked, poorly armed, poorly equipped, or poorly led. Sometimes they were but not always. Nor were the Romans always smart, well led, well armed, well trained, etc.
Many barbarian successes were only raids that were able to take advantage of the fact that the Roman Army was too small to be everywhere at the same time. Typically, a successful barbarian raid in an area with few Roman defenders would attract Roman reinforcements so that the Romans could soon retaliate and inflict more harm upon the barbarians than the Romans had suffered initially.
When the barbarians did win, it was often due to factors such as the element of surprise, or an incompetent Roman commander, or perhaps the Roman soldiers were poorly trained or equipped. These factors were usually short term effects and easily corrected. The Romans usually won in the long term.
If you are referring to the fall of the Western Empire, you would probably be surprised how Romanized the barbarians were. Also, Rome had bigger problems that just barbarians. For instance in the final century or so, the empire was under severe fiscal stress. The Western Romans could not afford to maintain the traditional army and had to make do with inferior substitutes (foederati, barbarian allies).
At any rate, it's difficult to generalize. Do you have a particular example of a barbarian victory that you are interested in?
By the time the Germanics took over the western Roman Empire they were basically already in charge of the Roman army... They were pretty much just fighting each other at that point. Even the Eastern Roman Emperor was like half German.
Rome was increasingly exhausted from too much expansion for a political structure that grew out of a City State.
Even with their excellent road system, communications were too slow to effectively govern the size of territory it had acquired.
By then end the middle class farmers who had been the backbone of the army were no longer. Pretty much only the rich and the rabble were left.
The fire had burnt out.
Historian Michael Rostovtzeff put it this way in his 1927 summary:
The development of these states of mind — apathy in the rich and discontent among the poor — was at first slow and secret. But suddenly it became acute, when the empire was forced, after nearly two centuries of peace and tranquillity, to defend itself against enemies from without. The time called for a great display of enthusiasm. But the rich could not be roused from their indifference; and the poor, seeing the helplessness and weakness of their betters, and deprived of all share in their idle and indolent contentment, were filled with hatred and envy. Realizing this internal malady of the state, the rulers tried to force their subjects to defend the empire and its civilization. The hand of authority was heavy on high and low alike. In order to save the empire, the state began to crush and ruin the population, lowering the proud but not raising the humble. Hence arose the social and political catastrophe of the third century, in which the state, relying upon the army or, in other words, upon the lower classes, defeated the upper classes and left them humiliated and beggared. This was a fatal blow to the aristocratic and urban civilization of the ancient world.
From this blow the ancient world never recovered. The creative powers of the aristocracy were finally undermined. The indolent and peaceful contentment of the first two centuries gave place to the apathy of dotage, to indifference and despair. In their sufferings men sought deliverance, not in this life but beyond it: they hoped for rest and happiness hereafter. Nor did the lower classes gain anything by their victory: slavery and financial ruin were their portion. They also, after the horrors of the third century, found a refuge in religion and the hope of happiness in a future life. In this impotent condition the empire spent its latter days, ever more and more simplifying its existence and asking less of life. The state, supporting itself upon the relics of past greatness, went on existing just so long as its culture and organization were superior to those of its enemies; when that superiority disappeared, new masters took control of what had become a bloodless and effete organism. Any creative power that remained turned away from this world and its demands and studied how to know God and be united with Him.
Thus here again, in the case of the Roman Empire, a steady decline of civilization is not to be traced to physical degeneration, or to any debasement of blood in the higher races due to slavery, or to political and economic conditions, but rather to a changed attitude of men’s minds. That change was due to the chain of circumstances which produced the specific conditions of life in the Roman Empire; and the process was the same as in Greece. One of these conditions, and very important among them, was the aristocratic and exclusive nature of ancient civilization. The mental reaction and the social division, taken together, deprived the ancient world of power to maintain its civilization, or to defend it against internal dissolution and barbarian invasion from without.
Germanic peoples had sophisticated gold-working and could make weapons able to if not defeat, at least threaten Roman armor. Rome struggled against them because Germanic people would have known what Caesar did to the Gauls and I'm sure they fought as if their very survival as a people depended on it-because it did.