Williams retired from Wales duty after the 2007 tournament in France but returned to the Test scene in style, earning selection for the 2009 Lions tour of South Africa.
The 35-year-old captained Wales to victory over Argentina on Saturday but his hopes of winning his 100th cap for his country now appear to be over.
Williams' replacement in the Welsh No7 shirt, Sam Warburton, has been named as Wales' World Cup captain after Lions hooker Matthew Rees was ruled out with a neck injury.
Warburton led Wales in the back-to-back clashes with England, as well as the June defeat to the Barbarians, with Gatland handing the 22-year-old the armband ahead of veteran back rower Ryan Jones.
Gatland has included 12 Lions in his squad for New Zealand, with Gethin Jenkins, Adam Jones, Ryan Jones, Alun Wyn Jones and Andy Powell named among the forwards and Lee Byrne, Leigh Halfpenny, Shane Williams, Jamie Roberts, James Hook, Stephen Jones and Mike Phillips dominating the backline selections.
Prop forward Jenkins is included despite not having played since January due to toe and calf injuries, while fellow front rower Adam Jones has also struggled with shoulder and toes trouble over recent months.
Fly-half Stephen Jones missed all three World Cup warm-up games with a calf problem and former skipper Ryan Jones pulled out of the clash with the Pumas due to a similar worry.
Summer squad members Scott Andrews, Jonathan Thomas, Justin Tipuric, Josh Turnbull and Gareth Delve failed to make the final cut, while injury victims Gavin Henson and Morgan Stoddart were unavailable for selection having featured against England and hooker Richard Hibbard damaged an ankle in his comeback against Argentina.
There is no place for 2005 Test Lion Dwayne Peel either, with last weekend's debutant Lloyd Williams and man-of-the-match Tavis Knoyle joining 2009 Lion Mike Phillips as Gatland's choices at scrum-half.
Wales squad for the World Cup
Backs: Lee Byrne (Clermont Auvergne) Leigh Halfpenny (Blues), Aled Brew (Dragons), Shane Williams (Ospreys), George North (Scarlets), Jamie Roberts (Blues), Jonathan Davies, Scott Williams (both Scarlets), James Hook (Perpignan), Stephen Jones, Rhys Priestland (both Scarlets), Mike Phillips (Bayonne), Lloyd Williams (Blues), Tavis Knoyle (Scarlets)
Forwards: Gethin Jenkins (Blues), Adam Jones, Ryan Bevington, Paul James (all Ospreys), Craig Mitchell (Exeter Chiefs), Lloyd Burns (Dragons), Huw Bennett (Ospreys), Ken Owens (Scarlets), Bradley Davies (Blues), Luke Charteris (Dragons), Alun Wyn Jones (Ospreys), Sam Warburton (Blues, captain), Danny Lydiate, Toby Faletau (both Dragons), Ryan Jones (Ospreys), Andy Powell (Sale Sharks)
NB Bold denotes Lion