Latham and Guptill's 148-run stand was the second highest by a New Zealand opening pair at Lord's, falling short of the 185 set by John Wright and Trevor Franklin in 1990.
They showed the value of getting into line behind deliveries with limited lateral movement off the wicket.
Earlier, New Zealand fought back to dismiss England for 389 but statistics suggest the visitors would be heading into rare territory if they won. Across 130 tests and 131 years at the ground, only one team has lost after posting more than 389 on the first innings.
England made 425 in 1930, but succumbed to Australia who replied with 729 for six, including 254 to Don Bradman.
Led by Trent Boult with two wickets, New Zealand stymied the flow of runs from the opening day. Only 35 were added on the second morning before the innings wrapped.
Looking refreshed, Boult attacked the crease to get Ali (58) and Broad (3) caught behind. An exclamation after the Ali wicket demonstrated his passion. His efforts continued the momentum gained when he had Jos Buttler lbw with the last ball of the opening day.
Matt Henry returned to snaffle Jimmy Anderson caught and bowled for 11. That left Boult and Henry one wicket short of a place on the dressing room honours board. Boult finished with four for 79 from 29 overs; Henry took four for 93 from 24.5.
In the pre-match warm-up wicket-keeper B-J Watling failed a fitness test but is expected to bat. His right knee swelled up when a Henry delivery hit in the opening session of the first day. As a replacement, Latham's work with the gloves across 74.5 overs proved competent. He conceded 15 byes but took sound catches of Joe Root, Ali and Broad. His batting vigil provided a good advertisement for adjusting to the pace, bounce and slope of the wicket beforehand.
England pace bowler Mark Wood suffered the biggest disappointment when New Zealand were 40 without loss. He lured Guptill into playing at a short length ball which he snicked to Alastair Cook at first slip on 24. The jubilation turned to consternation when a no-ball was revealed after the umpires double-checked.
Wood's still searching for his maiden wicket.
Guptill batted with a black armband out of respect to his wife's grandfather who died recently.