The introduction of new signings Peter Sweeney in midfield and Barry Conlon up front breathed new life into the side and they had the chances to have won even more comfortably.
Gillingham really only had two clear sights of goal and they came when they were trailing 2-0 only for keeper Wayne Henderson to pull off a couple of brilliant stops.
Right from the start there was a terrific atmosphere inside Blundell Park generated by a crowd of 6,406 - Grimsby's biggest of the season.
They clearly had the belief that Grimsby were going to stay up despite starting the game second from bottom and the confidence transferred from crowd to players. There was even a moment of utter farce in the first half when a male streaker just wearing a t-shirt was eventually caught by a group of stewards and frog-marched down the tunnel.
Grimsby deservedly took the lead on 33 minutes when Jean-Louis Akpa-Akpro reacted quickest after Nick Hegarty's shot hit the post.
A Sweeney free-kick just before half-time produced a terrific save from Simon Royce and the same player hit a post early after the break.
Conlon could have increased Grimsby's lead and then was denied a blatant penalty when he was pushed to the ground.
But Grimsby continued in confident vein and a a great run from Akpro set up Hegarty on 57 minutes and he rolled in number two.
And then the icing on the cake came in added time when Hegarty set up Conlon for a simple debut goal as Grimsby gained sweet revenge for an earlier 3-0 defeat at Priestfield.