They finished with a six-under 66 each over the 6 157-metre layout in an enthralling head-to-head duel between the top two South African golfers of modern times and Els topped the leaderboard on 263, 25 under par.
Goosen shared the lead after the first round; Johannesburg-born Els led by two strokes after the second and one stroke after the third, and was always ahead over the final 18 holes.
But just one shot separated them in the second of two rounds played on Sunday when Els sank a birdie putt at nine to turn with a two-shot advantage over his long-time domestic and international opponent.
And that lead stretched to four by 14 as Els drilled a 230-yard second close to the pin and dropped an eagle putt into the hole before Goosen staged a late rally with three birdie threes on the trot.
As the second oldest national championship after the British Open turned 100 this week, it was fitting locals occupied the top places with luckless Louis Oosthuizen (66) third on 267 and Charl Schwartzel (67) fourth on 270.
Englishman Robert Rock (67) and French teenager Romain Wattel (68) shared fifth place on 272 and German Alexander Cejka and another Frenchman, Victor Riu, came next a stroke further back.
Els displayed joy and emotion as he spoke about his fifth victory in the South African Open after giving a pre-tournament warning that he wanted to close the gap on record 13-time title holder Gary Player.
"This is a special day for me as I faced a lot of pressure, given I was up against great players and a great course," said the three-Majors winner.
"I realised from the start of the day that Retief was the one I had to finish ahead of. He has beaten me down the final straight quite a few times so it was great to triumph this time."
Rain
severely restricted play on the first day, forcing the organisers to
stage the final two 17-hole rounds on Sunday, with the fourth unplayable
because of a waterlogged green, and each player receiving a par three.
* Due to flooding after heavy
rain, hole four was not played for rounds three and four and all
players were given a nominal score of par.
263 Ernie Els (South Africa)
65 65 67 66 264
Retief Goosen (South Africa) 64 68 66 66 267
Louis
Oosthuizen (South Africa) 67 67 67 66 270
Charl Schwartzel (South
Africa) 65 69 69 67 272
Robert Rock (Britain) 69 69 67 67
Romain Wattel (France) 67 66 71 68 273
Victor Riu (France) 68 68 68 69
Alex Cejka (Germany) 64 72 69 68 274
Thorbjorn Olesen (Denmark) 68 69 68 69
Robert Dinwiddie (Britain) 71 69 66 68
Tim Clark (South Africa) 70 67 68 69 275
Kenneth Ferrie (Britain) 71 67 69 68
Martin Maritz (South Africa) 67 69 68 71 276
Stuart Manley (Britain) 69 70 71 66
Thomas Aiken (South Africa) 70 68 70 68
James Kingston (South Africa) 73 64 71 68
Colin Nel (South Africa) 69 68 70 69
Neil Schietekat (South Africa) 69 71 69 67
Tyrone Mordt (South Africa) 73 68 67 68
John Parry (Britain) 69 67 70 70