Man of the match Jack Mackreth set up a tap-in for Bohan Dixon eight minutes from time, before Mackreth got a goal his efforts deserved from the penalty spot in the final minute.
But the Yellows had to be patient to see off their spoiling opponents, who had set up to frustrate the visitors and allowed tempers to boil over in the second half when striker Remaye Campbell saw red for an ugly tackle on Adam Carden.
After five games without a win, albeit three of those in cup competitions, Warrington made a handful of changes to their line-up, with Carden starting in place of Mitch Duggan and Shaun Beeley starting in the centre of midfield, with Robbie Evans struggling with an illness and Mark Roberts still absent due to a virus.
Playing with a bitterly wind behind them, Warrington were soon on the front foot in the game, Tony Gray pickpocketing a midfielder in the centre circle and releasing Mackreth on the right, his perfect pull back struck on the bobble straight in to the keeper’s arms.
Creating openings from out wide, particularly through Mackreth, without converting the chance became a pattern of the first half for the Yellows, and they perhaps didn’t exploit the forward runs of Dylan Vassallo often enough after he twice beat the offside trap in the early stages.
Grantham did force the first corner of the game through a rare foray forward, but they were more concentrated on containing the Yellows, an act perhaps reflected by manager Richard Thomas asking the ball boys not to fetch the ball back so quick from the athletics track surrounding the pitch.
Gray shot over the bar and in the closing stages of the first half, set one up for Dave Raven to volley sidefooted straight at the ‘keeper and the hosts were happy to go in goalless at half time.
The game continued in much the same vein in the second half and within four minutes of the restart, the Yellows looked to have won a penalty when Vassallo was chopped down in the box after a wavy run, only for the referee to book him for diving.
That helped create a typically toxic atmosphere at The Meres, with Jacob Fletcher soon in the book for fouling Mackreth on the touchline.
It was turning in to a frustrating afternoon for the Yellows as they just couldn’t break Grantham down, but 14 minutes from time there would be another twist, as Campbell jumped in on Carden and was shown a straight red, much to the disgust of the home crowd, who applauded their man off the field.
That gave Warrington extra impetus and they finally broke the deadlock eight minutes from time. Mackreth again got at his man, checked back and delivered a teasing ball in with his left foot that was missed by the defence and the ‘keeper and left Dixon with a tap-in from barely a yard out.
The Yellows would eventually get the penalty they perhaps should have had at the start of the second half when Alex Whittle was hauled down in the box, and Mackreth stepped up and tucked the penalty away smartly to get the Yellows back to winning ways.
Grantham Town: Richardson, Barrows, Luto, Fletcher, Spencer, Bird, McGhee (Curtis), Hollingsworth, Campbell, Siddons, Thompson (Bastos). Unused subs: Charlesworth, Nassunculo, Gibbons.
Warrington Town: Albinson, Carden, Whittle, Garrity, Raven, Hughes, Mackreth, Beeley, Gray, Kirby (Reid), Vassallo (Dixon). Unused subs: Amis, Duggan, Evans.
CLICK HERE for a gallery of pictures by John Hopkins