Heavy. Cavalry.
After the invention of the stirrup, knights were capable of flanking an infantry formation, and carrying weaponry that out-ranged the roman spear. A bunch of properly-bred warhorses, when angered and accelerated, could kill their way right through an infantry formation even without the help of the massive lances that their masters packed. There are recorded incidents where a knight would kill as many as eight enemy troops before he drew his sword by merely driving his horse into them.
Towards the late Middle Ages, legion-like formations did make a comeback, but they were armed entirely differently.
I disagree. Rev Disk hit a few of the points.
Heavy cavalry is impressive, but is no match for disciplined, massed heavy infantry. Unless the infantry is outnumbered by an order of magnitude or loses its morale, it will prevail*. This is one-on-one. Combined arms forces and the means in which they are used play a huge role, of course.
Against the undisciplined, poorly-equipped, poorly trained, and indifferently deployed infantry of the Dark & Middle Ages, heavy & medium cavalry will cut through them like a hot knife through butter. Against Roman-quality heavy infantry, not just "no," but "hell no."
And the
field-transportable artillery of the era were not effective at dispersing much of anything. (The
siege-engines could be impressive, but were relatively worthless on a battlefield.) Heck, if even the artillery
Napoleon had at his disposal wasn't a sure thing vs infantry, Medieval arty doesn't have a chance.
As far as Hannibal, he had a quality
combined arms force with better cavalry than the Romans. it was a better-balanced field force than the Romans', but lacked siege ability. The vast majority of his forces were always infantry. Oh, and Hannibal was a stinking genius.
* Or some other circumstance that renders the infantry ineffective. See the end game of the Athenian debacle at Syracuse for such an example.