De Villiers (148) produced some glittering strokes but then knuckled down to ensure The Proteas totalled 421 and chiselled out a lead of 92 runs after the first innings in Cape Town.
In response West Indies lost Devon Smith (7) and Kraigg Brathwaite (16) during an uncomfortable start to their second innings but regrouped through Leon Johnson (37 not out) and Marlon Samuels (26no) to close on 88-2 and trail by just four runs.
South Africa only need to draw at Newlands to secure victory in the three-match series, having thumped West Indies in the opener by an innings and 220 runs and watched a deluge force a draw in the second Test.
De Villiers began day three on 32 and wasted little time in collecting his half-century, scoring the 18 runs he needed in the same number of balls through a combination of boundaries and excellent scampering between the wickets.
But the 30-year-old reined himself in when Hashim Amla (63) was snaffled by Jason Holder, Amla gloving the replacement ball through to Denesh Ramdin to bring a 97-run stand for the fourth wicket to an end.
De Villiers played some more juicy strokes, however, when Temba Bavuma (15) chopped on to the rapid Shannon Gabriel and Stiaan van Zyl ??? who scored a hundred on Test debut in the first game of the series at Centurion ??? entered the fray.
De Villiers and Van Zyl (33) put on 96 for the sixth wicket, during which time the former smacked spinner Marlon Samuels for 16 off one over to bring up his ton ??? his sixth against West Indies ??? from 144 deliveries.
Samuels eventually trapped Van Zyl lbw, while Jerome Taylor???s removal of Simon Harmer (10), also lbw, was sandwiched by the run outs of Vernon Philander (0) and Dale Steyn (0), the Proteas pacemen falling in the same way Alviro Petersen had on day two.
De Villiers went gung-ho at the end of his excellent innings as he looked to extend his side???s advantage, but tried one big shot too many and was caught in the deep by Gabriel to be the last man out.
Brathwaite and Smith headed out to bat after tea and immediately had their pads peppered by Steyn and Philander, though the lbw appeals were turned down by the umpires.
But it wasn???t long before they were both back in the hutch, with Smith gloving Morne Morkel down the leg side to wicketkeeper De Villiers and Brathwaite being bowled by debutant twirler Harmer.
Morkel shelled a hard chance off Steyn that would have dislodged Samuels as the Jamaican and Johnson battled through to stumps, posting their fifty partnership in the process.
???West Indies had a very good second half of the day after De Villiers had dominated the first part of it, picking up South Africa???s final five wickets cheaply and then batting with steel. De Villiers, though, is a pleasure to watch; his shot selection is excellent and he knows where the gaps are. Some sketchy shots from his team-mates, however, could come back to haunt South Africa.???