I've heard the Gallic sack of Rome mentioned numerous times, but it's always just breezed over like it's no big deal. I have a difficult time understanding how Rome managed to come back from it. Did they just kick the Barbarians out and rebuild the city? Did the Gauls just leave them alone? I would think being sacked would pretty much be the end for Rome, but about 70 years later, they were giving Carthage the business and pretty much dominating Italy and the surrounding regions if my understanding is accurate. What happened following the Gallic sack of Rome that allowed Rome to remain a dominant force in the Mediterranean a little over 50 years later?
Great question! Your timeline is a bit off so let's sort that out briefly, then it will start to make more sense and I'll turn to the 'sack' itself.
So Rome was captured in 390 BC, as you said, but Rome was fighting regular campaigns to consolidate their control in Central Italy for the next century. The main landmarks are victory in the Latin War in 338, giving Rome total control in Latium, closely followed by the Samnite Wars which continued into the 3rd century. Having beaten the Samnites, Rome started spreading it's tendrils south, culminating in the Pyrrhic War of 280-275 BC, after which Rome took Tarentum, the most powerful city of southern Italy. Rome started fighting the Carthaginians in 264, by which point they dominated Italy up to around the Po valley, where the Gauls were still very strong, and as a result of Roman victory in 241, Rome took Sicily and had it's first overseas presence. Rome started campaigning vigorously against the Gauls of northern Italy (including the Senones, the tribe mainly responsible for taking Rome), and broke their back in the 220s, closely followed by the outbreak of war with Carthage again from 218-202, after which the Romans returned to intense campaigning in northern Italy, which they were still doing in the 2nd century BC.
As you can see, it was a long, long time after the sack that Rome took total control of what we now consider Italy, and it was a gradual hard fought process.
As for the 'sack' itself, the damage caused to the Roman state has been exaggerated. There is little archaeological evidence for major destruction in Rome itself, and as the legendary story of the Battle of the Allia goes, the entire Roman army fled from fright into the city of Veii before so much as crossing swords with the Gauls, which is why the latter were able to capture Rome itself. So the Roman army still seems to have been completely intact at this time. When the Gauls took Rome, they don't seem to have caused an enormous amount of damage, and moved south after possibly being unable to break Roman resistance on the Capitol, or possibly after they were paid off. The Gauls went south and came back north later, and despite the Roman propaganda about Camillus saving the day, it seems that the Gauls were defeated by an Etruscan city on friendly terms with Rome, who returned a lot of stolen booty to the Romans.
So the Romans had a still functional city and a very large, intact army after the Gallic attack, with much of their stolen booty returned. The real damage was to Roman prestige in Latium and it's surrounds, with the result that Rome had to energetically campaign to reestablish its prior state of dominance in the area. As the long term history of Rome in Italy shows, Rome scarcely stopped campaigning in Italy for the next two centuries, so their recovery from the events of 390 and their subsequent expansion was actually somewhat slow and painful. The growth of their overseas empire, however, was somewhat more explosive. We might note that the damage to the Roman psyche from the events of 390 didn't go away for centuries, such that in the 50s BC Caesar was still capitalising on the ancient fear of the Gauls to justify his illegal campaigns.