The former German galloper edged Ireland's Heartbreak City (18/1) after a stirring run at Flemington
The former German galloper, starting at 10/1, edged Ireland's Heartbreak City (18/1) after a stirring run at Flemington to give jockey Kerrin McEvoy his second Melbourne Cup, 16 years after his first.
The 9/2 race favourite Hartnell, one of five Godolphin runners, was third, 4-1/4 lengths back in the Aus$6.2 million (US$4.7 million) international race over 3,200 metres (two miles).
It was a second Cup triumph for local trainer Robert Hickmott, who nursed Almandin back to racing health after 18 months out following a tendon injury after acquiring the seven-year-old gelding in Germany.
McEvoy, who won his first Melbourne Cup with Brew in 2000, got Almandin home from the Tony Martin-trained Irish stayer Heartbreak City, ridden by Hong Kong-based Brazilian jockey Joao Moreira.
"Lloyd, he knows what to do in these staying races. It's just a dream. It's great to be part of it again for my second Cup," McEvoy said.
His wife Cathy Payne, whose sister Michelle became the first female jockey to win on Prince of Penzance in last year's Melbourne Cup, is due to give birth to the couple's fourth child and he thanked her for "putting up with me the last few weeks".
The win made Williams, 76, the founder of Melbourne's Crown Casino, the most successful owner in Melbourne Cup history following his previous successes with Just a Dash (1981), What a Nuisance (1985), Efficient (2007) and Green Moon (2012).
He passed Frenchman Etienne de Mestre, Australian John Tait and Malaysian Dato Tan Chin Nam to set a new record for winners over the race's long history.
It was the first time Williams had been at a Melbourne Cup for 20 years, and he had not been trackside to watch one of his horses win since What A Nuisance was first past the post in 1985.
"This horse (Almandin) had a tendon (injury) and he was broken down so I'm quite emotional about this one," Williams said.
"The boys at Macedon (Lodge) have done a fabulous job getting this horse back."
The 156th running of Australia's iconic race produced one of its great finishes, with both horses burning off Hartnell at the 200m (furlong) before going stride for stride to the finish.
McEvoy managed to get that ounce more out of Almandin to squeeze home and just after crossing the line, Moreira sportingly reached out to congratulate his victorious rival.
"I couldn't win on him today, but I'm going home not disappointed or upset," Moreira said.
"In the last 50m I knew my horse was starting to get tired. Giving the best of himself for a long way. So the other one had a bit extra left and he got me on the line."
It was more Melbourne Cup heartbreak for the global Godolphin stable, which again failed to win the race despite peppering the field with five runners.
Dubai ruler Sheikh Mohammed's racing empire has now gone almost 20 years without tasting victory at Flemington despite three second placings.
"I'm extremely proud of him," Hartnell's trainer John O'Shea said. "He was wide for much of the race and he still put himself into it."
Another Godolphin runner, Qewy, was fourth, with Who Shot Thebarman fifth.
English stayer Big Orange finished 10th with another well-supported Godolphin runner Oceanographer 12th. Irish contenders Bondi Beach was 13th and Wicklow Brave 22nd in the 24-horse field.
Jameka, the only Australian-bred horse in the race and the lead-up Caulfield Cup winner, was well beaten down the home straight and finished 15th.