Latham was not out 25 with Raval on 17 and New Zealand requiring a further 340 to reach their 382-run target.
If successful, it would be the seventh-highest winning run chase in Test history.
New Zealand's highest successful fourth innings is 325 for five to beat Pakistan in Christchurch 24 years ago.
After England declared at 352 for nine, Latham and Raval had some difficult moments in a hostile first-up spell by Jimmy Anderson and Stuart Broad.
Anderson did everything but claim Latham's wicket as the New Zealand opener flirted outside the off stump in similar fashion to the way he was removed by Broad in the first innings.
After some near misses, Latham on 23 eventually found an edge but James Vince dropped the chance at third slip.
Broad, meanwhile, consistently beat Raval in his early overs and struck the left-hander with a painful blow in the ribs before he had scored.
While England's new ball bowlers were miserly, with Anderson conceding only nine runs from nine overs and Broad going for 16 off eight, the New Zealand pair did find runs easier to get off Mark Wood who went for 13 off two overs.
When the New Zealand innings began with a minimum of 137 overs to reach the target, the required run rate was 2.78 per over. When the light ended play 24 overs early, the run rate was 2.98.
England flourished at the start of the day when they resumed at 202 for three, with Joe Root and Dawid Malan moving the score briskly to 262 before Colin de Grandhomme rallied New Zealand.
He had Malan caught at mid-wicket by Henry Nicholls for 53 to start a tumble that saw six wickets fall for 90 runs before England declared.
Root, having shared in a 97-run stand with Malan, was out three balls later with an edge to wicketkeeper BJ Watling off Neil Wagner.
De Grandhomme, back at the scene of his best career figures -- six for 41 on debut against Pakistan two years ago -- produced his second best figures of four for 94 as he followed up with the wickets of Ben Stokes (12), Broad (12) and Wood (nine).
Jonny Bairstow, who was given not out on two when he feathered a ball to the wicketkeeper and New Zealand had no reviews left, was eventually out for 36 leaving Jack Leach not out 14 when the declaration came.
If New Zealand draw or win the Test it will see them triumph in a series against England for only the fourth time in 36 attempts.
England need to a victory to snap a 12-match away streak without a win.
First Published: April 2, 2018, 11:18 AM IST