At lunch, with the morning session reduced to 90 minutes, New Zealand were 132 for one with Raval on 54 and Kane Williamson on 27.
Raval and Latham produced the best opening partnership by either side in the series so far with 83 before Latham went in the seventh over of the morning.
The previous best start was South Africa's 18 in the second innings of the second Test which they won by eight wickets.
But he only faced another seven scoreless deliveries before getting an edge to a Morkel ball that angled in then straightened and Quinton de Kock dived to his left to take a one-handed catch.
It was a familiar dismissal for the left-hander whose four innings in the series have seen him caught twice by wicketkeeper de Kock, and once at third slip and once in the gully.