With the game expected to end in a stalemate, Michael Jacobs came from the bench to become the hero as he poked home deep into injury time – albeit via Jack Tucker’s deflection.
However, this will hardly deter the Fratton faithful’s mood as the club extends their unbeaten run to nine games while adding to their winning streak – stretching to six consecutive successes.
And the supporters from Gillingham and those from home have made their feelings known as Danny Cowley’s side close the gap further on the top six.
The George Hirst conspiracy theories that had Portsmouth Twittersphere in meltdown – and what is next for Leicester front man also wanted by Ipswich
Latest: Key development in Portsmouth's attacker pursuit as Danny Cowley puts finishing touches to squad
Portsmouth-born Mason Mount gets rare midweek night off from Chelsea duty to cheer on boyhood heroes against Cambridge United at Fratton Park
'Deserved standing ovation... Man mountain at the back... best game yet for Blues': Portsmouth match ratings from 4-1 win against Cambridge United
Picture gallery – 21 youth football team pictures from 2005
Read below the thoughts from those on Twitter.
@Deanprobert89: Keeping a clean sheet with no CB and stealing a win at the last minute. Lovely job
@Hilly69er: Big win with no cbs against a physical side. Some mentality we have at the moment.
@PompeyHenry: Don’t leave it so late next time!
@PFCSam: Love you Michael. Love you blues.
@BigGreggerr: That is huge. Absolutely huge
@HazzaTWoods: We needed an own goal to win it but we've won it. A Tucker own goal was enough to win the game at 1-0 with Crackers having a hand in the victory away at Gillingham. It wasn't the best but we've won and I'm not complaining, PUP!
@PFC_Forever: That’ll do. Tough match,stop start no centre backs but 3pts Excellent week.