Pakistan made 195 in the second T20 international, the first having been rained off in Durban on Friday, before dismissing the hosts for 100 - the Proteas' lowest-ever T20 total.
Ahmed Shehzad (46) proved a useful partner for Hafeez as the pair put on 83 for the second wicket, while three of Gul's five wickets fell in the South Africans' fifth over to decimate their hopes of reaching the target.
After winning the toss, Pakistan made an impressive start as Nasir Jamshed and Ahmed Shehzad found the boundary regularly. South Africa got their first breakthrough in the third over when Jamshed (13) was caught off the bowling of Lonwabo Tsotsobe. That brought in Hafeez, whose innings could have ended after one ball following a mix-up.
Both batsmen ended up at the striker's end but Faf Du Plessis missed the non-striker's stumps, with mid-on then also having a shy and lacking accuracy. The hosts were made to pay as the duo helped Pakistan reach 52 after six overs.
The partnership was ended in the 12th over in almost similar fashion, resulting in an easy run-out. Umar Akmal then went cheaply for 11, caught by Du Plessis off Chris Morris, before Hafeez departed in the 17th after backing onto his wicket and dislodging the bails.
At 170 for three, Pakistan were in a strong position but Shoaib Malik departed for seven while Kamran Akmal could make just one as they finished 195 for seven. South Africa had a decent start when captain AB De Villiers hit Junaid Khan for six in the second over, but Henry Davids departed at the end of the over - caught by Saeed Ajmal for seven.
The next over went for 14, Mohammad Irfan taking some punishment from De Villiers. But it proved a false dawn for the hosts as wickets began to tumble. Du Plessis, Morris and Justin Ontong all fell to Gul in a fifth over which left South Africa struggling badly at 51 for four.
They were soon five down after De Villiers was bowled by Irfan for 36, before Farhaan Behardien registered a duck, becoming Gul's fourth victim. David Miller was the next South African back in the pavilion, caught by Shehzad off Hafeez for nine.
Rory Kleinveldt's entertaining 22 from seven deliveries gave the home supporters something to shout about but he was swiftly snared by Hafeez. Robin Peterson (13) was next to perish at the hands of Hafeez, leaving South Africa 98 for nine, and when Abbott became Gul's fifth victim for two it was all over.