South Africa added 71 for their last two wickets after resuming at 257 for eight. In reply India was 28 for one at lunch with its opener Sehwag back in pavilion for nought after edging Nel to second slip and Gibbs did the rest.
Ashwell Prince, who was 98 not out overnight, top-scored with 121. Shanthakumaran Sreesanth was India's most successful bowler with four for 109.
Prince reached his fifth Test century in the third over of the day when he drove Sreesanth through the covers for four.
Prince found capable support from new cap Morne Morkel, a right-arm bowler and left-handed batsman, as the pair added 39 for the ninth wicket.
It took the second new ball to break the stand when Prince, immediately after hitting a scorching cover drive off Sreesanth, drove at a wide ball and edged a high catch to VVS Laxman at second slip. Prince batted for 316 minutes, faced 212 balls and hit 16 fours.
Morkel and last man Makhaya Ntini added another 32 before Anil Kumble wrapped up the innings when he trapped Ntini leg before for 16. Morkel was unbeaten on 31.
South Africa 328 (Ashwell Prince 121, Gibbs 63, Boucher 53, Morkel 31 n o; Sreesanth 4 for 109, Kumble 3 for 62, Zaheer 2 for 82) Vs India 28 for 1 (Jaffer 10 n o; Nel 1 for 6)