The No. 12 beat the No. 8 seed 6-2, 6-2, 7-6 to win at the All England Club for the fourth time in his decorated career. The men's final lasted 2:19 on Centre Court.
Djokovic got emotional after the victory, referencing his son and wife, who were sitting in the first row of the stands at the All England Club to watch him receive the trophy.
"Obviously today, being in his first Wimbledon final, he didn't play his best for two sets," Djokovic told the BBC. "But in the third set, he was a better player. I was actually quite lucky to get through."
Anderson played more than 10 hours of tennis in the quarterfinals and semifinals in order to reach his first Wimbledon final.
"The first two sets, Novak beat up on me pretty bad," Anderson said. "I really just tried me best to keep at it. I've really worked hard on that and came within maybe a point or two of pushing it to a fourth set. It would have been great to be able to play longer here but obviously playing against Novak isn't easy. He is really a true champion of our sport."
Djokovic's victory gave him his first Grand Slam title since the 2016 French Open. He was absent from the tour for six months after undergoing elbow surgery in January.
"I had to really trust the process," Djokovic said. "I had to trust in myself. I think I owe a great ... I am very grateful and owe a great thanks to my team ... to everyone that has been supporting me in the last couple of years that haven't been that easy."
The next Grand Slam is the 2018 U.S. Open, which begins on Aug. 27 at Flushing Meadows in Queens, N.Y.