Ervine made the most of the early life granted to him to score an unbeaten 115, taking Zimbabwe to stumps on 305 for six - just 78 runs shy of avoiding the follow-on.
Zimbabwe's batsmen showed that they had learned some lessons from the first Test, which they lost by an innings inside four days, although they were also assisted by the flat pitch at Queens Sports Club.
While the tourists managed three wickets in the opening session of the day, Ervine found an able partner in debutant Peter Moor, who scored 71 in a 148-run partnership for the sixth wicket that took more than a session out of the game.
Nevertheless, having declared on 582 for four in their innings, New Zealand remain confident that another result is within their grasp after dismissing Moor in the final half-hour of the day.
"We're down the bottom end of their innings. There were signs today that the carry is a bit lower and the pitch is taking a bit more turn."
Zimbabwe's total might have looked very different had Ross Taylor held a regulation slip catch off the bowling of Tim Southee when Ervine was on just one.
At that stage the hosts had seen opener Tino Mawoyo play on from the bowling of Southee and Sikandar Raza Butt get out with a loose shot to left-arm seamer Neil Wagner.
However Ervine battled on, seeing off a threatening spell of reverse swing from Trent Boult as well as the second new ball, and reached his hundred in the final hour of the day.
"Since I was tiny a hundred in Test cricket was always a dream for me," he said afterwards. "I had to work really hard ball after ball after ball to keep the concentration going but in the end it paid off.
