Both goals arrived in the space of a few first half minutes, with John Marquis stroking home the opener.
And Michael Jacobs then finished off a flowing counter-attack to score his first goal since his summer arrival.
The margin of victory might have been even greater had it not been for the woodwork and some fine Jack Bonham saves.
Kenny Jackett made three changes from the side that were beaten by Doncaster on home soil at the weekend.
Marquis came in for the injured Ellis Harrison, partnering Marcus Harness up front in a 4-4-2 formation.
Meanwhile, Ronan Curtis and Ben Close dropped to the bench to make way for Jacobs and Ryan Williams.
With Pompey one striker light, third year scholar Alfie Stanley was handed a place among the substitutes.
Both sides looked to get forward in the opening stages – perhaps inspired by the artificial crowd noise being pumped out over the public address system.
Gillingham had a couple of dangerous free-kicks, with Tom O’Connor sending one past the post and Jacob Mellis firing the other into the arms of Craig MacGillivray.
But the hosts were left stunned by a couple of impressive goals in quick succession from their clinical opponents.
The first saw Williams send a neat back-heel into the path of MARQUIS, who ran along the edge of the box before passing the ball neatly into the net.
And the advantage was soon doubled, courtesy of a lightning quick breakaway from the visitors that caught the Gills flat-footed.
Marquis held the ball up well before laying it off for Harness, who immediately played a perfect cross-field pass.
JACOBS was the recipient and he raced through on goal, holding off a challenge before firing home to open his Blues account.
Gillingham tried to hit back and Jordan Graham’s free-kick from the left was nodded narrowly over by Vadaine Oliver.
Graham then had a chance of his own, but could not quite keep his effort down after doing well to find space in the box.
But Pompey almost found a third goal just before the break, with Tom Naylor stooping to meet Williams’ cross and glancing a header against the post.
And the visitors went close again soon after the restart, when Jacobs cut inside from the left and drew a save from Bonham with his angled drive.
The ball then ran kindly for Williams, only for Declan Drysdale to dive in front of the Australian’s strike and divert it behind.
Callum Johnson and Harness soon combined well down the right, with the latter’s cut-back fired over by Jacobs.
Gillingham needed an inspiration and brought on John Akinde, who had a goalless spell at Fratton Park in 2013.
And they tried to take advantage of a cheap turnover on 58 minutes, with O’Connor’s shot deflected behind by Naylor.
There was another hairy moment a few minutes later, with Lee Brown trying to nod the ball back to MacGillivray and instead sending it inches past his own post.
But the Blues had a great opportunity to wrap things up when Williams lifted a fine delivery into the centre, where Marquis rose and headed off target.
Harness then raced onto a long ball over the head of Christian Maghoma and took a brilliant touch to send him through on goal, only for Bonham to make a key save with his feet.
Jackett freshened things up with a double substitution on 74 minutes, as Close and Curtis replaced Andy Cannon and Harness.
And Curtis immediately showcased some tricky footwork to get into the box, where a spot of pinball ensued before the visitors conceded a foul as they tried to force the ball into the net.
Gillingham came close to setting up a nervy finale, but MacGillivray saved Josh Eccles’ firmly-struk effort and Johnson mopped up the danger.
And Pompey also dealt with some dangerous deliveries into the box to see out the final few moments and seal all three points.
Gillingham (4-2-3-1): Bonham; Jackson (c), Maghoma, Drysdale, Ogilvie; Eccles, O’Connor; Samuel (Akinde 55), Mellis, Graham; Oliver (MacDonald 85)
Subs not used: Walsh, Tucker, McKenzie, Robertson, Coyle
Pompey (4-4-2): MacGillivray; Johnson, Whatmough, Raggett, Brown; Williams, Naylor (c), Cannon (Close 74), Jacobs (Pring 90+2); Harness (Curtis 74), Marquis
Goals: Marquis 14, Jacobs 17
Booked: Johnson, Marquis
Subs not used: Bass, Nicolaisen, Morris, Stanley
Referee: David Rock