Big-serving South African Anderson had taken the first two sets of the Court One clash on Monday evening before Djokovic battled back to level and force a deciding set, which fading light meant was held over until yesterday.
Djokovic experienced some nervy moments on the resumption, fending off break points, before sealing a 6-7 (6/8) 6-7 (6/8) 6-1 6-4 7-5 fourth-round success, breaking decisively in the 11th game as Anderson’s served faltered to complete his comeback.
The world No 1 will face US Open champion Marin Cilic in today’s quarter-final.
Djokovic, the champion in 2011 and again last year, said: “I think Kevin served exceptionally well.
“I found this was one of the most difficult matches I’ve played at Wimbledon maybe in my career.
“At times I was really helpless with my return. It was very difficult to read his serve.
“He was very aggressive.
“To come back and win in five definitely gives me great satisfaction and confidence for the next challenge.
“It was frustrating at times, especially [yesterday], but I managed to go through and that’s all that matters.
“I congratulate Kevin for a great effort.
“It wouldn’t have been undeserved if he’d won this match.”