South Africa were 280 for nine at the close, an overall lead of 229 in a match in which batsmen have struggled on an unpredictable pitch.
Coming in with South Africa four down and only 22 runs ahead, De Villiers justified the welcoming cheer he got from the crowd as he shared three half-century partnerships before falling three short of his fourth Test century when he drove Jacob Oram to cover three overs before the close.
De Villiers put on 67 with Jacques Kallis, who made a solid 62, before adding 54 with Mark Boucher (21) and 65 with Nicky Boje (31).
De Villiers and Boje gave the crowd the most exciting entertainment of the day when they thrashed 36 off the first four overs with the second new ball, prompting New Zealand captain Stephen Fleming to bring on the medium-paced Oram.
The switch worked as De Villiers, at 22 one of the most talented young batsmen in the world, played tentatively at Oram before playing a loose drive to fall in the 90s for the third time in his short career.
South Africa earlier were in trouble when they lost three wickets before wiping out a first innings deficit of 51. The home side's problems started when out-of-form captain Graeme Smith was trapped in front of his stumps by Chris Martin for seven in the third over of the day when just four runs had been added to South Africa's overnight total of four for no wicket.
Smith's opening partner, fellow struggler Herschelle Gibbs, failed for the second time in the match when he was caught at second slip off James Franklin for two.
First innings top scorer Boeta Dippenaar started promisingly but when he was on 16 he got a ball from Jacob Oram which kicked and he edged a low catch to New Zealand captain Stephen Fleming at first slip.
As on the second day, the new ball deviated alarmingly at times during the morning period, with uneven bounce and sideways movement.
Conditions improved for batting in the afternoon but South Africa lost Ashwell Prince soon after lunch when he flashed at a lifting ball from James Franklin and was caught behind for 11.
Kallis and De Villiers stabilised the innings and both were looking comfortable when New Zealand captain Stephen Fleming called on Scott Styris to bowl for the first time in the match.
Stryis' third ball was short and outside off stump and Kallis went for the pull shot but top-edged a high catch to Vettori.
But De Villiers found able partners in Boucher and Boje as he went to his 97 off 161 balls with 13 fours.
The wickets were shared by all seven New Zealand bowlers, with James Franklin and Oram taking two each.
South Africa, first innings, 276
New Zealand, first innings, 327
South Africa, second innings (overnight 4-0)
Falls: 1-8, 2-19, 3-42, 4-73, 5-140, 6-194, 7-205, 8-270, 9-276