Gill scored four runs in three balls before leaving the field due to neck strain.
The Indian skipper walked out to bat after allrounder Washington Sundar departed handing over a catch in the slip.
Sundar was dismissed by Sumon Harmer for 29 runs.
After Gill walked back to the pavilion, wicketkeeper-batter Rishabh Pant came out amid loud cheer and joined his set partner KL Rahul in the middle.
India bowled out South Africa for 159 on Friday.