She is joined in the cast for the hour-long BBC1 special by Miranda Hart, Rob Brydon, Julia McKenzie and Walliams himself.
Miss Marple star McKenzie plays the dull pensioner with a secret past as a jewel thief who gets her grandson, played by Reece Buttery, tangled up in one last heist, with Walliams and Hart playing his ballroom dancing-obsessed parents.
Walliams said: "I am thrilled that we have such a stellar cast of comedy legends for Gangsta Granny. I can only apologise that I am in it too."
Filming starts on Sunday with the show set for broadcast at Christmas.
Gangsta Granny was Walliams's fourth children's book. First published in 2011 it has sold almost half a million copies.