Graham Turner's men took the lead in the 17th minute when left-back Joe Jacobson headed a Paul Parry corner into the top corner of the net for his first goal of the season.
Jacobson was then involved in a near miss for Tom Bradshaw who did well to chest down a long ball forward only to fire just wide of the far post.
Gills briefly came back into it with Chris Weale beating out a stinging free-kick from Charlie Lee before Danny Kedwell headed against the near post.
But the hosts continued to look the more dangerous and impressive Spanish debutant Cristian Lopez forced a full-length save from Stuart Nelson just before the break.
Shrewsbury, having conceded costly late goals in their last four games, decided attack was the best form of defence in the second half.
Jon Taylor and Adam Reach both forced sharp saves from Nelson and Shrewsbury made sure of the points nine minutes from time.
Bradshaw's clever pass released sub Liam McAlinden, on loan from Wolves, and he kept his cool to fire low to the far corner of the net.