Nadal suffered through a return to grand slam tennis that at one stage looked like it would be unthinkably brief.
Since coming back from seven months out with knee problems, the Spaniard has been almost untouchable, winning six of his eight tournaments and reaching the final in the other two.
The hot favourite to extend his record of Roland Garros wins to eight, a first-round match against Brands was expected to be nothing more than a routine run-out on Court Philippe Chatrier.
But, at a set down and 3-0 down in the second-set tie-break, the exit door was almost within Nadal's sights.
German Brands, ranked 59th, had one game plan - to hit his forehand very hard at every opportunity, and it was working better than he could ever have dreamed.
The 25-year-old had never won a main-draw match at Roland Garros while last week he won only one game against world number 95 Jan Hajek in Dusseldorf.
Nadal, on the other hand, had never previously lost the opening set in the first round of any grand slam and has twice won the French Open without losing a single set.
Nadal had two chances to break in the eighth game but Brands held firm, and that set the nerves jangling for the Spaniard, who promptly gave his serve away with a double fault.
After clinching the first set, it would not have been a surprise to see the German's level drop, but he matched his illustrious opponent and was in control at 3-0 in the tie-break.
For the first time he faltered and it was the chance Nadal needed, the 26-year-old winning seven of the next eight points and going on to clinch a 4-6 7-6 (7/4) 6-4 6-3 victory.
The fourth seed felt his troubles were largely down to the brilliant play of his opponent, and expressed disbelief that Brands is ranked so low.
Nadal said: "I think that he arrived on the court completely decided upon striking all the balls, 100%, and he was inspired today.
"He was just firing on all cylinders. He had a fantastic tactic. Maybe my tactic wasn't very good. I don't know where Brands is in the rankings but I can tell you that he can't be 60th. The way he played, I just don't believe it.
"He made me suffer. I can tell you, and I'd like to pay tribute to what he did. I'd like to wish him every success, everything that he deserves for the future."
Nadal's philosophy, instilled in him by his coach and uncle Toni Nadal since he first picked up a racquet, has always been never to underestimate any opponent.
"You have to fight and you have to suffer, and that's exactly what I went through," said Nadal.
"I think throughout my entire career, I have experienced many matches of this type. These are things that you just have to take on your chin in a career and accept once again.
"You have to have sufficient humility just to recognise that your opponent at that particular point in time is playing better than you."
Nadal's last grand slam match before Monday was the shock loss to Lukas Rosol in the second round of Wimbledon, and if they both win their next matches then they will meet in the third round.