After dropping the opening set in his first two matches, Nadal trailed 4-2 and was down a break at 6-5 before surging ahead for his 18th consecutive victory.
Nadal seeks to become the first man to win eight titles at the same Grand Slam event. He improved to 55-1 at Roland Garros despite enduring some wobbly moments for the third match in a row.
Nadal committed 40 unforced errors and faced 11 break points.
He next plays No. 13-seeded Kei Nishikori, who became the first Japanese man in 75 years to reach the fourth round at Roland Garros, beating Frenchman Benoit Paire.
The other defending champion, Maria Sharapova, overcame eight double faults, an incorrect line call, and a second-set deficit to beat Zheng Jie 6-1, 7-5 in the third round.
"I'm happy with the way I fought back and I found a way to win," said Sharapova, who completed a career Grand Slam by winning the Roland Garros title last year.
Sharapova will next play Sloane Stephens of the United States, who reached the fourth round for the second consecutive year by beating Marina Erakovic of New Zealand 6-4, 6-7 (5), 6-3.
Stephens was joined by two unseeded Americans reaching the round of 16 at Roland Garros for the first time. Julie Hampton defeated No. 7-seeded Petra Kvitova 6-1, 7-6 (7), and Bethanie Mattek-Sands beat qualifier Paula Ormaechea 4-6, 6-1, 6-3.
Like Sharapova, Australian Open champ Victoria Azarenka struggled with her serve, but she rallied past Frenchwoman Alize Cornet 4-6, 6-3, 6-1.
Seeded third, Azarenka hit 10 double faults and was broken six times. She managed a smile later when asked about her serve.
"I think I left it home today," she said. "If I can win with serving like this, that's pretty remarkable."
She next plays unseeded Francesca Schiavone, the 2010 champion, who beat No. 13 Marion Bartoli of France 6-2, 6-1.
Sharapova found herself trailing 4-1 in the second set after the incorrect line call. Facing a break point at 30-40, she hit a second serve that was ruled out.
The umpire climbed off his chair to check the mark and confirmed the call. Sharapova briefly argued in vain, contending the umpire looked at the wrong mark.
A TV replay showed her serve had indeed hit the line. The French Open is the only major tournament that doesn't use a video replay system, and Sharapova said that should change.
"It's not even about the fact of the call, whether it was in or out," she said. "The umpire did not recognize that the mark he pointed out was about a foot away from the actual mark."
Sharapova shook off the setback, sweeping the next three games to reach 4-all, and broke in the final game.
The Russian improved to 33-4 this year, including 14-1 on clay, and owns the best winning percentage on clay (.821) among active players.
Over on court 1, the No. 17-seeded Stephens won the last three games against Erakovic, who was penalized a point in the third set for being coached.
A year ago, Stephens became the first U.S. teenager to reach the fourth round at Roland Garros since Serena Williams in 2001. She followed that up by reaching her first Grand Slam semifinal at the Australian Open this January, beating Williams to get there.
"This is my favourite tournament," said Stephens, now 20, "so I would really, really, really love to win this tournament."
The centre court stands were half-empty on a cloudy, mild day for Azarenka's match. Crowds will likely be bigger for her next week, and so will the stakes.
"Center court is something that motivates me every time I walk on court," she told the crowd after her victory, "and I can't wait to be back here."
Azarenka has won the Australian Open in each of the past two years. Roland Garros is the only major tournament where she has yet to reach the semifinals.