Goffin was serving for the first set at 5-4 but facing break point with Zeballos on the front foot.
Scrambling to get another ball back, the Belgian found himself deep in the court and slid almost into the back wall, tripping on the court cover that was rolled up there.
The 26-year-old immediately clutched his leg and was in severe discomfort.
After a lengthy medical time-out, it became clear that he could not continue and Zeballos was awarded the match and a place in the fourth round of the French Open for the first time since he reached the semi-final back in 2013.
David Goffin was left crumpled at the back of the court after freak injury
David Goffin was gutted to have to retire after less than a set of his third round match
The result left Goffin, who was seeded 10th and is ranked No12 in the world, distraught as he was among the favourites to reach the latter stages.
He reached the quarter-finals in 2016, his best ever performance at Roland Garros, and got himself to the same stage of Australian Open earlier this year.
He had already dispatched Paul-Henri Mathieu and the ever-dangerous Serhiy Stakhovsky with relative ease, although the latter had taken the third set.
And Goffin had arrived in Paris full of confidence, having beaten both Dominic Thiem and Novak Djokovic at the Monte Carlo Masters.
But now he will merely be hoping the ankle injury is nothing more serious than a sprain with the next major at Wimbledon just over a month away.
Get Quotes on Home Insurance