The 36-year-old, who toured with the Lions in 2005 and 2009 and retired from international rugby at the end of 2011, was already travelling to Australia to do radio punditry and will leave the squad on Wednesday after the match.
Centre Jamie Roberts sustained a suspected hamstring injury in Saturday's 47-17 victory over the New South Wales Waratahs, further depleting Gatland's resources in the backline with the first test against Australia just a week away.
"Shane's already halfway here, he was playing in Japan, and it made it a lot easier for travel reasons," coach Warren Gatland told a stunned news conference in Sydney.
"We're just trying to be proactive in looking after players, players like Sean Maitland who's sore after playing three matches in a row.
"We're trying to give our Test side the best possible chance to be fit and fresh before they potentially try to win a test match on Saturday."
Eight of the squad to face the Brumbies were not in the original 37-strong tour party and the team will appropriately be captained by Irish hooker Rory Best, who came into the party as the first replacement for the banned Dylan Hartley.
Winger Christian Wade, who was on England's tour of Argentina, and centre Brad Barritt, who was in the United States, were called up as replacements overnight and both also go straight into the side for Canberra.
England centre Billy Twelvetrees, called up last week to cover the Lions midfield, also makes his Lions debut against the twice Super Rugby champions.
Roberts joined England centre Manu Tuilagi (shoulder), Wales winger George North (hamstring) and Irish winger Tommy Bowe (broken hand) in the treatment room.
Gatland conceded he perhaps should have included more than 16 backs in his party.
"Unfortunately, the forwards have been holding themselves together while the backs have been taking all the knocks," he said.
"If you look at the most attritional position, the loose forwards, they're all up and for and ready to go. It's just one of those things, the games have been tough and physical.
"Players have turned up afterwards and they're sore and they have to be freshened."
Although Wade's call-up after making his test debut last weekend was something of a surprise, the inclusion of Williams, albeit temporary, was a stunning selection.
The pacey but diminutive Welshman scored 58 tries in 87 tests before retiring and is now in the second year playing in Japanese club rugby.
"He's in pretty good nick, he's been boxing as well, hopefully that won't be needed on Tuesday," Gatland laughed.
"I'm sure he'll come in and do himself and the jersey proud."
Although Williams would leave the party on Wednesday, all other players were still in with a chance of playing in the first test in Brisbane on Saturday, Gatland said.
Team: 15-Rob Kearney, 14-Christian Wade, 13-Brad Barritt, 12-Billy Twelvetrees, 11-Shane Williams, 10-Stuart Hogg, 9-Ben Youngs, 8-Toby Faletau, 7-Justin Tipuric, 6-Sean O'Brien, 5-Richie Gray, 4-Ian Evans, 3-Matt Stevens, 2-Rory Best (captain), 1-Ryan Grant.
Replacements: 16-Richard Hibbard, 17-Alex Corbisiero, 18-Dan Cole, 19-Geoff Parling, 20-Dan Lydiate, 21-Conor Murray, 22-Owen Farrell, 23-Simon Zebo.
- Sports & Recreation
- Warren Gatland