England seamer Matthew Potts (1-13) removed Will Young (eight) early in the innings with a fine out-swinger before Latham (76no) and skipper Kane Williamson (37no) steadied the innings, propelling New Zealand to 1-125 on Friday afternoon.
Latham saw off the new ball skilfully and then latched onto anything loose, striking 12 fours to notch up his 23rd career fifty and his first of the series.
The hosts were guilty of bowling too full on a pitch offering scant movement but should have seen the back of Latham just before the break, only for Joe Root to spill a routine chance at first slip off Stuart Broad.
Earlier, Jonny Bairstow smashed a magnificent 162 while debutant Jamie Overton fell three runs short of a century as England were dismissed for 360 in their first innings for a 31-run lead.
Resuming on their overnight total of 6-264, Bairstow and Overton continued to play positively early in the morning session before the latter edged paceman Trent Boult to Daryl Mitchell at first slip to miss out on his landmark.
Bairstow and Overton came together with England at 6-55 and their brilliant rescue act resulted in a 241-run partnership for the seventh wicket to keep the hosts afloat.
Overton struck 13 fours and two sixes in his 136-ball knock.
His dismissal brought Broad to the wicket and he struck a 36-ball 42, targeting fellow pace bowler Boult in the 60th over by smashing him for two fours and a massive six and punishing Neil Wagner in the next over.
However, Broad was then bowled by Tim Southee before Bairstow, who hit 136 in 92 balls at Trent Bridge in the second Test to win the match, fell looking to raise the scoring rate as Michael Bracewell had him caught at long-off by Boult.
Bairstow later took the gloves after regular wicketkeeper Ben Foakes was unable to take the field due to stiffness in his back. England said Foakes will be assessed overnight.
England have a 2-0 lead and are aiming to win every match of a home series with at least three Tests for the first time since their 4-0 rout of India in 2011.Â