The Premise is a bit off here. During the Crisis of the 3rd Century as well as after, the Roman army usually could win a set-piece battle over barbarians or the Persians. The difference was that the Roman army usually wasn't around where these incursions happened, and the tribes could run amok without much opposition.
With the distractions of the Civil Wars, the armies were often off dealing with succession business rather than remaining close to the border. If an emperor tried to move back to a frontier, often he was deposed. And if he was on one frontier, the others had nobody.
Ironically, the first turn of the tide was the 'secession' of the Gallic Provinces and the East under Odenathus and Zenobia. These new 'emperors' marshaled the local forces much like the Emperor might have, but now there were three at the same time. This is were you started to see an improvement against the invaders, as each sector could concentrate on one area and start to make headway.
The Illyrians then gave some superior leadership that began to make inroads into the indiscipline of the army (although with some setbacks as Aurelian was murdered by officers). This and the improved frontier situation allowed the Empire to be rather easily reunified by Aurelian, as the breakaway provinces really didn't want to destroy the Empire.
This same solution was used by Diocletian with the Tetrarchy - having 4 emperors at once allowed each to readily respond to frontier threats. It worked well as long as Diocletian was around to be the unifying force, but broke down after that.