Kenny Jackett bemoaned Pompey’s inactivity in the final third as they suffered a first defeat on the road this season.
They dominated possession and had the lion’s share of chances, without really testing Gillingham goalkeeper Tomas Holy.
Josh Parker made them pay by scoring a header just before the break, while Callum Reilly wrapped things up with a penalty at the death.
And Jackett conceded that the home back-line did a better job of defending their box than his side did of attacking it.
The Blues boss said: “We dominated the game and looked in control – it was similar to the other league match with them this season.
“There were three corners for us in the first 10 minutes and a couple of wide free-kicks not long after that.
"There haven’t been many games this season where we haven’t been able to score, but our opponents defended their area excellently."
“But it always a blue-shirted player that got there and then in the second half, when we were trying to get back into it, there were numerous crossing opportunities.
“Gillingham again looked better in their box, though, and we just couldn’t find a way through to get a shot away.
“It was an excellent header from Parker for them, while we couldn’t find one at the other end, which was frustrating.
“There haven’t been many games this season where we haven’t been able to score, but our opponents defended their area excellently.
“It was a similar pattern whatever combinations we used. We were probing in and around their box, although didn’t do enough with the ball.”
Pompey played the closing stages at Priestfield with just 10 men, with Nathan Thompson injuring his hamstring after they had made all three changes.
Jackett said: “It does look like he’ll now be out for us. He’s been a good player, but injuries happen during a season and your squad have to adapt.”