An injury time goal by Christian Roberts secured all three points for City.
Rounding off a non-stop display, the Welshman seized the ball ten yards into the Grimsby half. Tapping the ball past their towering centre-back Tony Crane, he placed a cool shot out of the keeper's reach.
City had dominated the second half without finding a killer blow until Roberts made the vital breakout.
Grimsby, looking for the points themselves, had pressed around the home goal with a run of three late corners.
After a lack-lustre first half, the game sprang to life when Bristol City manager Danny Wilson made two tactical changes during the break.
Veteran Brian Tinnion went on to provide the steadiness of pass in the midfield while Aaron Brown, having completed a seven-match suspension, gave the necessary dash on the left to swing the game to City.
Confident though after their two wins in a week, Grimsby built a magnificent defence around centre-backs Crane and Simon Ford but striker Mick Boulding, who had scored in each of their four previous League matches, never got a look in.
It was left to Stuart Campbell to get in Grimsby's most telling shots. The first was over the shoulder and reached keeper Steve Phillips on the bounce; the second late in the game was a more stinging affair drawing an alert save.
City needed to impress their fans after two disappointing away results and their skipper Tom Doherty went close with an early header while Roberts' shot on the turn was not far off target.
In the second half the traffic was all one-way and the Australian youngster Luke Wilkshire was setting up chance after chance.
One of the most effective passes saw a Roberts shot beaten down at the near post in a purple patch for the home side.
Grimsby made two late changes and introduced Wes Parker in defence, a third year YT player.
He had not been on long before almost gifting Bristol City a goal as he misjudged a deep cross from Louis Carey.
Grimsby's keeper, Aidan Davison, had brought off a smart one-handed stop as Parker's misjudged header was going past him and he then made an even more significant stop to deny City's leading scorer Lee Peacock.