Gangsta Granny couldn't have come at a better time. All around us the chattering classes fret about how we're going to care for our burgeoning elderly population. Meanwhile, comedian, actor and globally successful children's writer David Walliams is focusing on the next generation: it seems he's single-handedly attempting to make sure the yoof appreciate their golden oldies. Who knows, the story's message goes, what delightful secrets your ancient relatives might be keeping? You don't know what you've got until it's gone.

This sense of a little gem of a person almost being overlooked is at the heart of Walliams' story and it shines through in Neal Foster's smart, compelling and very, very fun adaptation for Birmimgham Stage Company. Ben hates spending Fridays at his granny's house because she's boring, smells of cabbage and she makes him play Scrabble. That all changes when Ben finds a stash of stolen jewels in her biscuit tin and discovers that his granny is actually one of the most exciting people who ever existed.

There are a surprising number of very poignant moments in the piece, brought beautifully and carefully to the fore by an excellent cast. Gilly Tompkins' Granny looks horribly upset when she hears Ben telling his parents how much he hates his granny visits. "You're the highlight of my week Ben!" she says to him later: it's enough to make any heart shatter into tiny pieces.

But though there are pockets of pathos, Gangsta Granny is mainly fuelled by fun. The story has you wanting to find out what on earth happens between Ben and his newly-found best friend Granny and when you do, it is as gloriously satisfying as anything onstage at the moment.

Foster's adaptation relies mostly on the strong story, avoiding too much padding and playing it for laughs, which his Horrible Histories often suffers from. There are a lot of fart jokes, however, along with some exceptionally surprising diversions which include dancing bears, madcap escapes and Granny spitting excellent rhymes. One or two of these moments feel a little superfluous, but mainly they are placed well – the ridiculous bear came just as several of the younger audience members began to fidget.

The cast – lead by Tompkins and Ashley Cousins as Ben – are uniformly super. Cousins has a really relatable, likeable presence onstage and his chemistry with Tompkins is beautifully endearing. Tompkins is subtle and excellent, twisting from frail old lady to bolshy, robust terror in easy, hilarious swoops.

Jacqueline Trousdale's doll house sets are almost a show within themselves. Three segments stand onstage and fold out into Granny's house, Ben's house, the Queen's pad and more, with barely a stage hand to help. In fact the entire ensemble cast work on the scene changes, dancing and jiggling through them to vary the pace.

Ultimately it's the charming story which should captivate your kids and it's a story with an excellent message. Even if Granny is a bit of a rogue, she's also a diamond in the rough.

Gangsta Granny runs at the Garrick Theatre until 3 September and then continues to tour.