Throughout Avatar: The Last Airbender, Toph Beifong claimed to be the greatest Earthbender of all time. She certainly had many showings to prove it, becoming the Earth Rumble champion known as the Blind Bandit, keeping Wan Shi Tong's Library from collapsing into the Spirit World and even inventing metalbending to push the boundaries of what the elemental martial art could do.
But there are still others who could beat Toph in a fight if they were to ever come to blows. Other Earthbenders are just a hard counter to Toph's fighting style, and there are even those who outmatch her in sheer power. She may have beaten almost every Earthbender she faced in the original series, but there are certain matchups she just outright loses.
Maybe the most immediate example of a hard counter to Toph's abilities is Ghazan. While Toph's blindness is what lead to many of her greatest discoveries, attuning her to the earth around her as she developed a "seismic sense" to navigate the world, it repeatedly proves to be an exploitable weakness as well. Necessitating a firm stance on the ground she rarely leaves, Toph would meet her match the moment she goes against a Lavabender like Ghazan.
The Red Lotus member was the first Lavabender seen in the series, using even a minute number of rocks to escape his prison cell in The Legend of Korra. When he unleashed the full force of his abilities he created massive moats of magma Toph would be helpless against. Toph never showed any ability to lavabend in Avatar: The Last Airbender or afterward, so her every attack would be useless against Ghazan as he turned the earth against her.
In the same vein as Ghazan, fellow Lavabender Bolin would be a pretty tough matchup for Toph. Bolin first discovered lavabending against Ghazan, and even managed to fight evenly with him member by the end of Book Three. Bolin actually turned out to be a fanboy of Toph's when the two finally met in Book Four, but if worse came to worst it's incredibly likely he could beat her. After all, Bolin has an advantage that even Ghazan couldn't quite match: agility.
Pro-bending taught Bolin a highly mobile and evasive form of combat that has been anathema to Toph ever since she first lost in the Earth Rumble against Aang. Though Toph is no stranger to lavabending, first coming across it in Toph's Metalbending Academy where the Earthbender Sun demonstrated the ability, it's still a total question mark as to how she would do in open combat against a Lavabender. Bolin's showings against Kuvira's mecha tanks prove just how effective he can be when he really goes all out, and if Toph would lose to Ghazan she would certainly lose to the more agile Bolin.
Even with lavabending out of the equation, highly mobile and agile fighters are difficult for Toph to counter. There are few Benders more mobile and evasive than Kuvira, with the deadly Great Uniter of Book Four formulating her own unique style by the time she came to power. Combined with Kuvira's frequent use of manipulating the earth beneath her opponent, Toph would likely be too disoriented to counter effectively.
Kuvira may well have been the greatest Metalbender of Korra's Era, too. Many of Toph's showings in metalbending are big in their displays of power, be it the time she redirected an entire airship's fin or when she held a collapsing iron mine for hours on end. Kuvira is no slouch in the power department herself, however, as in Ruins of the Empire she split apart an entire car and converted it into metal spikes against her foe. Given that Kuvira has the finer degree of control, zipping out bands of metal around her opponents and even using them to split boulders, it's hard not to give her the edge in a fight.
There is one fight Toph had against another Earthbender that she notably did not win, and that was against King Bumi. When the two squared off in the comics they fought to a standstill, but both combatants were explicitly holding back and their fight never came to any real conclusion. The lingering mystery about who was the better Bender has bugged fans ever since, so in looking at who would win it's crucial to analyze what feats of earthbending each Bender actually performs.
By that metric, it's hard not to give a solid edge to Bumi. While liberating Omashu from the Fire Nation, Bumi tossed multiple factories into the air in a display of strength that dwarfs anything Toph has ever done. In his duel against Aang during his debut epiode, Bumi turned the ground beneath his opponent into quicksand, a further means of exploiting Toph's difficulty with terrain. In terms of both raw power and a hard counter, it's clear that Bumi would be the true winner if they ever went all out.
Fans arguing over who the greatest Earthbender of all time is are mistaken if they think the debate is between Toph and Bumi, because the real answer is that it's Yun. A primary character in the Kyoshi novels, set centuries before Toph's birth, Yun was a Bender of exceptional talent who frequently performed feats no one else is shown capable of. He could earthbend vast distances away from his target, manipulate materials few even dreamed were bendable and could even liquify the earth to manipulate it as fluidly as a Waterbender.
The real clincher to Yun's dominance over Toph in a fight is his training. At first believed to be the next Avatar before Kyoshi was identified, Yun's training blended all four elements into a unique style unlike any Toph has ever faced. He even trained in the arts of assassination, honed into the perfect killer and proving it time and again as he wielded the stone around him with deadly efficiency. Yun was so powerful that even Kyoshi alone could not stop him, and when you're strong enough to contend directly with an Avatar, you earn a place in a tier firmly above anybody else in the franchise.