Goosen, who bogeyed the opening hole in the final round, closed with a 3-under 70 at the par-73 Fancourt Golf Club to end the tournament at 10-under-par 282 and win this crown for the second time.
Els, despite an opening-round 3-over 76, took second place at 9-under-par 283 after closing with a 5-under 68.
'Ernie played very well and I got away with it at the end there,' said Goosen, who claimed his 13th European Tour win. 'It's great to win this trophy again. The last time was ten years ago so it's great to get my hands on it again.'
Gregory Bourdy carded a 3-under 70 to move into a tie for third at 2-under-par 290. He, along with Darren Fichardt (74), were the final two players in red figures. Mattias Eliasson, Gregory Havret and Keith Horne shared fifth place at even-par 292.
Goosen, who also won this title in 1995, knocked his approach shot over the green at the first. He was unable to save par and slipped to minus-6, two clear of Els.
Els, last week's winner at the dunhill championship, picked up a stroke on Goosen as he drained a 10-foot birdie try on the third. Both players birdied the fourth, Goosen from 12 feet out and Els from 2 feet. Els then birdied the eighth to tie Goosen in the lead at minus-7.
Goosen, the fourth-ranked player in the world, quickly regained the lead with a 5-foot birdie putt on the ninth. Els looked to be out of it at the 12th, as his second shot bounced off the green and into a hazard.
Els, who is No. 5 in the world, could do no better than double bogey to fall three back. However, he bounced back with a birdie on 14. Els made it two in a row with a 12-foot birdie putt on the 15th to move within one of Goosen.
The 1994 and 1997 U.S. Open champion joined Goosen in the lead at minus-8as he converted his third straight birdie, this one from 4 feet out on the 16th.
Goosen reclaimed the lead at No. 17 with a dramatic chip-in birdie from over the green.
'It was one of those chips, that if I play it well, I can get it within 8 feet and make par that way, and instead it went in,' said Goosen.
With the tournament on the line, both players showed their mettle. Goosen putted to 5 feet from the back chipping area, and sank that birdie putt. Els missed his eagle putt from 7 feet out, but tapped in for birdie to end one stroke back.
'I just couldn't make a putt today to save my life,' said Goosen. 'On a golf course like this, its so tough that anything can happen.'
Francesco Molinari posted a 2-over 75 to finish alone in eighth place at 1-over-par 293. Last year's winner Tim Clark struggled to a 76 in the final round to finish at plus-2. He was joined there by Ross Fisher, who faltered to a 5-over 78 on Sunday.
South African Patrick O'Brien posted a disastrous 14-over 87 on Saturday. He came back strong on Sunday closing with a course-record, 6-under 67. However, it was only good enough to get him into a share of 58th place.