The Frenchman entered the day at Bernardus Golf in a share of the lead but was three shots back stood on the 17th tee as the in-form Fox put on an impressive display.
A double-bogey on the last from the Kiwi saw him sign for a 68 and leave the door ajar, however, and Perez birdied the penultimate hole to head down the par-five 18th back in a share.
The 29-year-old had six feet to take the title on the final green but missed his putt to stay at 13 under after a 69 and we headed to extra holes for the third time in five events.
A 20-footer kept him in it as both men made a birdie on the first trip back up the 18th and after a pair of pars at the second attempt, Perez made another lengthy putt for a gain.
But he was not done there, holing from over 40 feet at the 17th on the fourth play-off hole to seal victory with a birdie.
Perez also earns himself a spot at The 150th Open Championship this summer alongside Fox and Pole Adrian Meronk, with the top three players in the top ten not exempt heading to St Andrews.
Meronk finished a shot out of the play-off after a 68, a score matched by German Marcel Schneider who finished at 11 under.
Since winning his maiden DP World Tour title at the 2019 Alfred Dunhill Links Championship, Perez has finished second in three Rolex Series events and in the top-five at two World Golf Championships.
This second victory moves him to 24th on the DP World Tour Rankings in Partnership with Rolex and could move him back into the top 100 on the Official World Golf Ranking.
I just tried to focus on me all day, that's all I can do, is try to keep a champion mindset and hit good shot after good shot
"There was a fair amount of fortune, I've got to be honest with myself, holing out those long putts in the play-off," he said.
"I just tried to focus on me all day, that's all I can do, is try to keep a champion mindset and hit good shot after good shot.
"The chips were going to fall where they were going to fall, it's almost impossible to predict what is going to happen in golf: guys come out of nowhere and win tournaments and guys take huge leads. You just have to focus on you and not look at the board and I was just fortunate to fall on the right side today."
In regulation, Fox birdied the first from 11 feet to join the lead and then made a two-putt birdie on the par-five fourth to hit the front on his own.
Perez also made his gain on the par-five as he got up and down and he followed it with a 38-footer on the next, extending his lead at the par-five seventh with the help of a beautiful pitch after laying up.
Fox chipped in at the 11th to trim the lead to one and it was all change on the next as the 35-year-old holed an 80-footer from just off the green at the 12th for an eagle and the lead.
Perez then dropped a shot on the tenth and when Fox holed from 46 feet on the 14th, he led by three.
Fox had looked to be in cruise control but he took a drop after almost finding the water on the last, missed the green with his third and found sand with his fourth, surrendering a double-bogey and leaving the door open for Perez's big finish.
Meronk was bogey-free as he picked up shots on the fourth, fifth, 12th and 16th but his highlight was a spectacular par on the eighth as he played his ball from shallow water, found the green and holed a 47-footer.
Schneider recovered from an opening bogey with five birdies in his round, while Soderberg signed for a 71, and Wallace, Björk and Gouveia all carded level-par rounds of 72.