The Serbian has been fighting for two years to restore health, form and confidence after the heights of making it four slam titles in a row at the French Open in 2016.
His two-day semi-final victory over Rafael Nadal proved he was back to his best and he fought off a comeback from Anderson to win 6-2 6-2 7-6 (7/3), earning him a 13th grand slam trophy.
Anderson, in his first Wimbledon final, had five set points in the third set but could not take any of them.
And Djokovic wrapped up victory after two hours and 19 minutes, pointing his finger at the sky before taking his now customary bite of the Centre Court grass.
Anderson did not even schedule a practice session on Saturday as he battled to recover from the effects of his epic semi-final against John Isner, where he finally overcame the giant American after six hours and 36 minutes.
That came on the back of the four hours and 14 minutes he played to defeat Roger Federer in the match of his life in the quarter-finals, so it seemed inevitable he would not be at his peak.
Djokovic also had to focus on rest and recuperation following his stunning match against Nadal, more than two hours of which were played on Saturday after the 11pm curfew cut them off on Friday night.
But he made the perfect start, reading the Anderson serve immediately and breaking in the opening game when the South African double-faulted.
The crowd, which included Prime Minister Theresa May and the Duke and Duchess of Cambridge watching from the Royal Box, were desperate to see Anderson at least make a match of it.
But his physical troubles were evident when he called the trainer at the end of the first set for massage on his right arm, which has done more than its fair share of serving this fortnight.
After last year’s final, when Marin Cilic was heavily beaten by Roger Federer and his own blistered foot, this was shaping up to be another underwhelming occasion, but Anderson was determined not to go down meekly.
The 32-year-old has worked tirelessly to improve his game and has seen the rewards over the last two years, including a first slam final at the US Open last summer and a place in the top 10.
He could not prevent the second set slipping away but Djokovic was no longer having an easy time of it and Anderson ensured he kept his nose in front early in the third set.
Djokovic was increasingly on the back foot in rallies, and he double-faulted twice to cough up two set points at 4-5 – only to hold his nerve and save them both.
On the first, the crowd roared prematurely when they thought he had missed a forehand, prompting the Serbian to put his finger to his lips and then pump his fist in their direction when he finally held.
It was reminiscent of his third-round win over Kyle Edmund, but this time the crowd reaction was less about bias towards his opponent than in favour of a great contest.
Anderson was certainly doing his best to create that, but three more set points came and went in the next Djokovic service game and they headed into a tie-break, where the Serbian quickly stamped his foot down and did not yield.
But just an hour and five minutes later, Kerber was celebrating a 6-3, 6-3 victory and her first Wimbledon title.
Kerber said of her win: “It’s just a dream come true.
“I knew I had to play my best tennis against a champion like Serena. It’s always an honour to share a court with her.”
With the Duchesses of Sussex and Cambridge in the Royal Box and Tiger Woods, Lewis Hamilton and Anna Wintour among those supporting Williams from her box, the stage seemed set for sport’s most famous mother to write another remarkable chapter.
It was a rematch of the 2016 final, which Williams won, but this time there was no doubt who was the better player and Kerber was able to celebrate her third Grand Slam title, becoming the first German singles champion at Wimbledon since Steffi Graf in 1996.
Kerber defeated Williams to win the Australian Open in 2016 and then, after losing here, lifted the trophy at the US Open. Last year was a real struggle for Kerber so it was no surprise she was so emotional at the moment of victory.
Williams had been chasing a record-equalling 24th Grand Slam singles success and was close to tears at the end, saying on court: “It was such an amazing tournament for me. I was really happy to get this far.”
As Williams said after her semi-final victory against Julia Goerges, there was nothing normal about her being in a 30th Grand Slam singles final 10 months after giving birth to daughter Olympia and suffering life-threatening complications.
But so superbly did she play against Goerges that it was no surprise to see her made favourite against Kerber, who had been equally impressive in her own run to the title decider.
The 30-year-old gave Williams a very different test to what had come before, with Kerber among the leading counter-punchers in the game. Her ability to retrieve a huge number of balls would put the focus on her opponent’s footwork and physical resilience.
Playing her first slam final since the 2017 Australian Open, which she won while two months pregnant, in only her fourth tournament back, it was perhaps no surprise that Williams started nervously.
She recovered from 2-0 down to lead 3-2, clinching the fifth game with a 125mph ace, the fastest serve of the women’s tournament. But, rather than pull away, she became tentative again, dumping volleys in the net and unable to match the consistency of Kerber.
Urged on by husband Alexis Ohanian and her celebrity supporters, Williams upped her aggression and noise level, nearly taking out her opponent with a thunderous drive volley in the third game of the second set.
But Williams seemed unsure how best to break down Kerber, and the next point saw her inexplicably pat a volley back that should have been the simplest of put-aways and pay the price. All she could do was smile.
There was no doubt in Kerber’s mind, though, and she produced a series of superb points to break the Williams serve for the fourth time in the match and move 4-2 in front.
Williams tried everything to get back into the match but her afternoon was rather summed up by the drive volley she placed over the baseline in the final game after a stunning rally.
“It’s obviously disappointing but I can’t be disappointed,” Williams said. “I have so much to look forward to. I’m literally just getting started so I’ll look forward to it.”
Williams said of Kerber: “She’s an incredible person and a really good friend so I’m really happy for her. It’s her first title and I know she’s going to really enjoy it and enjoy the moment. Congrats again – it’s amazing.”
The Serbian former world number one will face Kevin Anderson in Sunday’s final after an absorbing 6-4, 3-6, 7-6 (11/9), 3-6, 10-8 victory which took five-and-a-quarter hours.
Djokovic, whose last grand slam final appearance came at the 2016 US Open, said: “I’m just overwhelmed. This kind of match you live for, you work for.”
The match was watched by a crowd that included the Duchess of Cambridge and Duchess of Sussex, who had front-row seats in the Royal Box.
“It really could have gone either way,” Djokovic said. “It was very clear that very few things separated the two players and until the last shot I didn’t know if I was going to win. I believed it but I knew that he was very, very close and he had some chances.”
It was the second longest semi-final in wimbledon history with the longest, of course, having taken place 24 hours earlier.
The 52nd meeting between these two great rivals was delayed by the six hours and 36 minutes it took Anderson and John Isner to play their match, with Djokovic taking a two-sets-to-one lead before play was suspended just after 23:00 on Friday.
Nadal will regret his missed opportunity the night before, when he was in the ascendancy but passed up two set points. But while Anderson and Isner’s titanic tussle was more an exercise in totting up aces, this was a cast-iron classic.
The Centre Court roof remained closed, and the players carried on where they left off, raising the level of tennis seen at the championships so far by several notches.
The opening game alone, on Nadal’s serve, was 15 minutes of blistering groundstrokes and stunning winners, the Spaniard fending off two break points amid six deuces to eventually hold.
Yet when Djokovic’s serve was placed under scrutiny it promptly caved in, Nadal breaking to 15.
Nadal gifted a break back with a suddenly sloppy service game but when he struck again for 5-3 Djokovic’s frustration boiled over and he began hammering the sole of his shoe with his racket.
Djokovic forced three break points but Nadal hauled himself level and clinched the set with an ace – called out but correctly challenged – to take the match into a decider.
South African Anderson, presumably watching somewhere with his feet up, will have no doubt been pleased.
Nadal faced a break point at 4-3 behind but roared away from trouble with a powerful first serve followed by two vicious, whipped forehand winners.
Djokovic was under the cosh in the next but two booming serves saved two break points and suddenly Nadal found himself at 0-30 as he served to stay in the match.
Once again his first serve was his saviour and the match started to enter prime Anderson-Isner territory.
At 7-7, Djokovic double-faulted for 15-40 but again got out of that hole before a simply sensational forehand winner saved another break point.
The atmosphere, in sharp contrast to Friday’s slug-fest, was electric. Djokovic converted his game point and urged the crowd to its feet, Nadal converted a smash and raised his arms aloft.
Nadal was flagging, though, and it told in the 18th game of a 91-minute final set. Djokovic raced to 40-0 and when his rival’s tired forehand floated long, the 12th seed raised his arms again.
Djokovic said on BBC One: “It was a late night, early morning but at the end of the day I’m so glad to overcome this challenge.”
Of the task against Anderson, Djokovic said: “Hopefully we can first of all play, both of us get out on court. It’s been a roller coaster ride for him, the last couple of rounds, but he’s had a day off which means a lot. I wish I could have had one.
“But I’m in the final of Wimbledon and it’s an incredible achievement for me after what I’ve been through. I’m trying to digest that first, enjoy it, and we’ll think about the next one.”
Nadal said: “It has been a great match – I think a fantastic level of tennis for both of us. I was not a spectator, but I think it was a great show for the fans.
“I’ve nothing to complain about. I think I played a great match. I have not much more inside me. I gave it my best, and that’s it. It’s fair to say that it was a great match and he beat me. Well done for him. That’s all. That’s sport.”