Murray had gone into the match on the back of four consecutive defeats in the showpiece of a major but looked to be on course for victory after taking the first two sets.
Djokovic hit back to level the encounter but Murray, in windy conditions that hampered both competitors, held his nerve to become the first Briton to win a grand slam title in 76 years by closing out the match 7-6 (12/10) 7-5 2-6 3-6 6-2.
"After the third and fourth sets, it was tough mentally for me. Novak was so, so strong - he fights till the end in every single match," Murray told Sky Sports 1.
"I don't know how I managed to come through in the end.
"I've had some really tough matches with him in the past but I just managed to get through it."
The Scot was quick to pay tribute to coach Ivan Lendl, who also lost four grand slam finals before triumphing in his fifth.
"He's one of the greatest players to have ever played. Here he made eight consecutive finals," Murray added.
"It's great to have him supporting me and helping me in the tough moments and not just him, but everyone else has been there from the start so thank you very much."
Australian Open champion Djokovic hailed Murray for lifting his maiden grand slam.
The world number two was favourite to add to his collection of five major triumphs but admitted he was second best on Monday.
"It wasn't to be but I want to congratulate Andy for his first grand slam. He absolutely deserves it," Djokovic said.
"His team, this is your success as well.
"I would like to thank my team, family, friends for supporting me. I tried my best.
"I gave it my all and it was another tremendous match to be a part of.
"It was definitely enjoyable."