David Friio turned from villain to hero as last-gasp Plymouth Argyle came from behind for the first time this season to notch their first win in six games.
French midfielder Friio, who missed an open goal that would have given Argyle victory at Ipswich seven days previously, netted with two second-half headers inside two minutes – the second a minute into injury-time – to turn the game on its head.
Gillingham had looked like breaking their own winless run of five games and taking three points back to Kent when striker Darius Henderson won a one-on-one battle with Argyle centre-back Graham Coughlan to score two minutes after the interval.
Argyle, missing injured wide men Tony Capaldi and David Norris, struggled to get back into the game despite manager Bobby Williamson changing the formation several times and using four strikers in various combinations.
However, their persistence paid off. First, Friio glanced home Lee Makel's left-wing corner with a well-timed run and jump.
A minute later, Pilgrims' substitute Steven Milne delivered a perfect cross to the back post where Friio dived to send a powerful header back across Gills' goalkeeper Steve Banks into the far corner.
Gillingham, who gave a debut to Adam Nowland, signed on loan from West Ham in midweek and recalled player-manager Andy Hessenthaler, lost John Hills with a suspected broken ankle, before carving out two chances.
Nyron Nosworthy's cross from the right found Henderson at the far post, and the former Reading player cushioned a header to tee up Andrew Crofts for a shot that was tipped around the post by goalkeeper Romain Larrieu.
Then Darren Byfield sprung the Argyle offside trap and curled in a shot which Larrieu touched wide.