Williams, 43, won 18-16 to become the oldest champion since fellow Welshman Ray Reardon, who was 45 in 1978.
He won his third World Championship – 15 years after his last – by holding off John Higgins’ stunning fightback in a classic Crucible final.
He won seven frames on the trot to take a 14-7 lead but Scot Higgins, 42, came back magnificently to take eight of the next nine and level at 15-15.
However, Williams responded in style to secure a famous victory.
The final was the closest since 2005 when Shaun Murphy beat Matthew Stevens by the same scoreline.
Williams claimed a record £425,000 at the Sheffield venue, taking his total prize money to £750,000 for the year, while Higgins’ wait for a fifth title continues.
“It’s unbelievable. Twelve months ago I wasn’t even here. I watched it in a caravan,” Williams told BBC Sport.
“I was seriously thinking of giving up, but my wife Joanne said I can’t sleep in the house 24 hours a day.”
And after saying earlier in the tournament that he would speak to the media naked if he won the title, Williams walked into his news conference undressed apart from a towel.
The final pitted two players from snooker’s ‘class of 92’, turning professional in that year alongside Ronnie O’Sullivan – and as far as sporting fairytales go, this is a remarkable one.
Only last summer, Williams failed to qualify for the Crucible and considered retirement, before deciding to continue.
He claimed two ranking titles earlier this season, six years after his last, and now has 21 in his career.
Williams showcased his best snooker in Sheffield, knocking in long pots when Higgins had seemingly got the cue ball safe, before compiling frame-winning contributions in amongst the reds.
His laid-back manner and languid appearance around the table – sometimes even making pots with his eyes closed – was a throwback to the turn of the century when he was the best player in the world and claimed world titles in 2000 and 2003.
He finished his dramatic semi-final against Barry Hawkins at 23:50 BST on Saturday and two hours later was eating a kebab and chips at a takeaway in the city.
During the final, he asked to share some crisps, sweets and chocolate snacks with a fan who was sitting beside him in the arena.
Despite being under extreme pressure late on, Williams – who was never behind in the match – held himself together for an outstanding success which will move him up to third in the world rankings.
For Higgins, it was a case of another missed opportunity. The Scot has now lost three finals, winning the last of his four titles in 2011 against Judd Trump.
He blew a 10-4 lead against Mark Selby last year, which he admitted could have been his best opportunity to add a fifth world crown and draw alongside O’Sullivan.
A mixed tournament this time saw him thrash Jack Lisowski 13-1 in the second round, before edging a thrilling final-frame decider against Trump in the last eight.
However, in the final, he was always chasing the game against Williams, trailing 10-7 overnight, and although he got level at 15-15 and made four centuries, never managed to edge in front and was punished for uncharacteristic mistakes.
There was even a chance Williams could finish the match with a session to spare, but Higgins’ epic fightback prevented that.
“I was worried if I would take it to the fourth session,” said Higgins. “I didn’t want to lose with a session to spare.
“It was a good match to watch but obviously I’m disappointed. He is a great champion.”