Campbell's clinical 37th-minute finish did the damage as the Championship side avoided an upset against their League One visitors and claimed their first home win of the season at the bet365 Stadium.
It was Campbell's first goal since the start of July when he bagged a brace in a 4-0 win over Barnsley, a result which helped Michael O'Neill's side retain their Championship status last season.
Victory was also Stoke's first home win over Gillingham for 16 years having last beat them 2-0 in their own backyard on 21 August 2004.
And the home side, who face either Aston Villa or Bristol City in the next round next week, could have won by more if it had not been for a couple of smart saves from Gills keeper Joe Walsh and if Josh Tymon had not struck the crossbar with a thunderbolt strike.
Stoke were the better side throughout and skipper Tommy Smith had a good early chance for the hosts but his deflected shot in the sixth minute was saved by Walsh at his near post.
Smith had another good opportunity soon after but his left-foot volley from James McLean's cross was cleared in the six-yard box by defender Zech Medley.
The Gills then broke on the counter-attack and had a penalty appeal turned down when striker John Akinde went down in the box after a clash with defender Nathan Collins.
Walsh came to the visitors' rescue just before the half-hour mark with a superb reaction save.
Harry Souttar lost his marker and hit the target, but Walsh spread himself brilliantly to deny the Australian international defender from point-blank range.
Campbell teed up Jordan Thompson as Stoke looked the likelier to score, but his left-foot shot flew well over the crossbar.
But it was Campbell who made the breakthrough eight minutes before the break with a cool finish.
Smith's defence-splitting pass caught the Gills napping and an unmarked Campbell finished clinically into the bottom left corner.
And the home side could have easily doubled their lead just three minutes later, with Campbell this time the provider.
He set up Tashan Oakley-Boothe on the overlap, but the forward saw his powerful low drive saved by Walsh at his near post.
Tymon went agonisingly close to extending Stoke's advantage just before the hour mark, but this thumping left-foot strike cannoned off the crossbar and to safety.
Substitute Steven Fletcher had a penalty appeal waved away by referee David Webb after a wrestle with Medley in the area, but Stoke struggled to create any clear-cut chances on target as the Gills defender deep.
Fellow sub Jacob Brown had a goal disallowed with five minutes remaining, but Campbell's first-half finish proved enough as Stoke edged through after victories over Blackpool (on penalties) and Wolves in the previous two rounds.