Sizwe Ndlovu, Matthew Brittain, John Smith and James Thompson started conservatively on Thursday afternoon, going through the 500m mark in third place, and dropped back to fourth by the 1 500m mark.
Over the last 500m stretch, however, they fought back and passed hosts Great Britain, Australia and Denmark to clinch gold in 6:02.84 seconds.
Britain secured silver, 0.25 seconds behind the South African quartet, with Denmark bagging bronze a further 0.07 seconds behind.
Their win pushes South Africa to eighth on medal rankings, up from 14 this morning – landing on par with Kazakhstan.
Focusing on butterfly
Meanwhile, Le Clos continued his fine form in the pool when he posted the fastest semifinal qualifying time in the men's 100m butterfly heats at the Olympic Games on Thursday morning.
Le Clos won his heat in 51.54 seconds, placing him in pole position for Thursday night's semifinals.
The 20-year-old South African, who won gold in the men's 200m butterfly on Tuesday, withdrew from the 100m individual medley final, which will be held later on Thursday, in order to focus on the butterfly – his speciality stroke.
The US's Michael Phelps, the silver medallist behind Le Clos in the 200m final, was second fastest of the qualifiers in the 100m heats in 51.72.
Three-time Olympic medallist Roland Schoeman and countryman Gideon Louw both qualified for the men's 50m freestyle semifinals.
Schoeman, who secured the bronze medal in the same event at the Athens Games in 2004, won his heat in 21.92 seconds, qualifying fifth fastest for the semifinals, while Louw was 11th fastest in a time of 22:12.
Karin Prinsloo also progressed to Thursday night's semifinals, finishing fifth in her women's 200m backstroke heat and qualifying 13th fastest in 2:10.34 seconds.
Wendy Trott failed in her bid to qualify for the women's 800m freestyle final, finishing fourth in her heat in 8:28:98. – Sapa