Williams, 36, a two-time Lions tourist and last year awarded an MBE for services to rugby, will join the squad from Japan where he is playing club rugby with Mitsubishi Dynaboars.
Williams played the last of his 87 Tests for Wales against Australia in 2011, scoring his 58th international try with his last touch of the game.
The former World Player of the Year's tour appearance will be a one-off. He will fly in on Monday, line up on the wing on Tuesday for the Lions and leave camp on Wednesday.
"He is in pretty good nick. He is already halfway here so it made it easier," head coach Warren Gatland said. "We know he is fit and in training. I am sure he will come in and do the jersey proud."
The Lions have also rushed in late call-ups Billy Twelvetrees, Brad Barritt and Christian Wade into the backline to face Jake White's Brumbies in Canberra on Tuesday. Barritt was holidaying in the United States when he got the call.
England wing Wade and centre Barritt were called up overnight as cover following a hamstring injury to Welsh star Jamie Roberts, while Brian O'Driscoll, George North and Manu Tuilagi are managing injuries ahead of Saturday's opening Test in Brisbane.
Twelvetrees, who arrived in Sydney on Friday, will make his Lions debut alongside Barritt in the centres against the Australian Super 15 conference leaders in Canberra.
"We have obviously got ongoing treatment of some players so it's prudent to make sure we have enough backline cover," Gatland said.
"Christian played well in the first Test against Argentina and is match fit."
The Lions have now made a total of seven call-ups for reinforcements since arriving in Australia a fortnight ago, with three of them made in the last 24 hours.
Irish winger Simon Zebo, who arrived last week and played in the Lions' 47-17 win over the NSW Waratahs in Sydney on Saturday, has been named on the bench.
Ireland hooker Rory Best will captain the team, while Irishman Rob Kearney will get his first start on tour after recovering from a hamstring injury.
Lions (15-1) - Rob Kearney; Christian Wade, Brad Barritt, Billy Twelvetrees, Shane Williams; Stuart Hogg, Ben Youngs; Toby Faletau, Justin Tipuric, Sean O'Brien; Richie Gray, Ian Evans; Matt Stevens, Rory Best (capt), Ryan Grant.
Replacements: Richard Hibbard, Alex Corbisiero, Dan Cole, Geoff Parling, Dan Lydiate, Conor Murray, Owen Farrell, Simon Zebo.