'I was trying to look around as much as I could to soak it all in,' said Hamilton. 'I've won tournaments around the world before, but nothing on a stage like this, so to be Open champion is very special.'
The duo finished regulation tied at 10-under-par 274 after Hamilton bogeyed the 72nd hole and Els missed a 7-foot putt for birdie. After pars on the first two holes of the cumulative playoff, Els missed the green at the par-3 17th and knocked his second shot to 8 feet.
Hamilton, who posted a 69 in the final round, found the green off the tee and two-putted for par while Els was unable to convert. Back to the 18th tee, Hamilton hit his drive down the right side and managed to clear a bunker with his approach.
The American, who spent 17 seasons traveling the world before earning his PGA Tour card through Q-School last year, rolled a utility club within 2 feet of the hole and tapped in for par and the biggest win of his career.
'It was a lot of hard work. Ernie is a true champion. He fought to the very end, not only in regulation, but in the playoff. That's why he's a major champion,' said Hamilton. 'I'm so excited. I probably won't sleep for two days. I won't even sleep on the flight home, which I'm usually able to sleep pretty well, but I guarantee I'll be up.'
Hamilton held the outright lead heading into the final round, but with a handful of the top players in the game within a few strokes of the top spot, the 38-year-old had plenty of work ahead of him to maintain his position.
He got off to a good start at the first and hit his second shot to 8 feet. Hamilton missed his birdie try right, and sent his drive into the rough at the par-4 second to fall back into a tie for the lead with Els.
Thomas Levet, who was in contention throughout the week, chipped in from the rough for an eagle at the par-5 fourth to move to the front of the leaderboard at 8 under. Phil Mickelson then holed his third shot at the fourth to grab a share of the lead.
Els converted an 18-foot putt for a birdie at the third and grabbed the lead on his own with a birdie at the very next hole. Hamilton persisted and matched his playing partner with back-to-back birdies from the fourth to reach minus-9.
Tiger Woods, seeking his first win in a major since the 2002 U.S. Open at Bethpage, got into the mix with a chip-in birdie from a bunker at the fifth and a birdie at the sixth. The 2000 Open champion at St. Andrews could not keep pace in the inward half.
Mickelson hit a tremendous drive at the par-4 seventh and pitched his second to eight feet for a birdie to regain a piece of the lead. Els, who bogeyed the fifth, then birdied the seventh to join the logjam.
Hamilton found trouble with a bogey at the difficult par-4 10th and Els struggled even further. The South African hit his second shot into thick grass and barely managed to muscle his ball down the fairway and was unable to get up and down for a double bogey.
Just like that, Mickelson, who snapped his drought in the majors with a victory at the Masters and nearly won the U.S. Open at Shinnecock last month, found himself in the lead.
Mickelson, who was holding on with several crucial par saves, was again joined by Hamilton, who played his second shot to 9 feet for a birdie at the 11th.
Mickelson, who had not dropped a shot since the opening round, bounced his second shot short of the green at the 13th and almost holed out with his third. The left-hander failed to make his par coming back and once again was in the chase.
Hamilton, who earned his first PGA Tour win at The Honda Classic earlier this year, kept plugging along and chipped in for a birdie at the par-3 14th after his tee shot missed the green. He moved to 10 under and at the par-5 16th, Hamilton knocked his third shot to 9 feet and drained the putt to open a two-shot edge over the field.
With Mickelson in the clubhouse at 9 under, Hamilton still had Els to worry about. Els, who was almost spoiled Mickelson's party at the Masters and was in contention at the U.S. Open until a disastrous final round, saw the door open at the 72nd hole in regulation.
Hamilton hit a bad tee shot left at the last, while Els ripped a drive down the middle of the fairway. After playing a recovery shot with his second, Hamilton hit his third to 11 feet.
Els, seeking his second Open title and his fourth major victory, played his second shot within 7 feet of the hole. Hamilton missed his par putt, and with a birdie chance to win, the Big Easy left his putt short.
The thrilling conclusion in regulation was almost imitated exactly in the playoff, but this time around Hamilton grinded out a par with his so-called 'ugly golf' tactic and walked away with the claret jug.
'I think when I don't hit the ball well, having a good short game allows me to at least be competitive, maybe not on a scale like this every week, but I play what I call ugly golf,' he said. 'I hit a lot of punch shots, a lot of big slices off the tees, or big fades, just to keep the ball in play.'
Els, who had birdied the 16th and the 17th, had the tournament in sight but was unable to sink a birdie putt at the last for his third runner-up finish at the British Open.
'Right now I'm thinking of the putt on the 72nd hole,' Els said. 'That's the putt I'm going to be thinking about for a while. I had such a good second shot, you know. And it was such a weird pin placement where if you were short of the hole, you had such a difficult putt. And if I knew that I probably would have hit it past. I tried to do that in the playoff, too. But that putt, I'm going to think about that putt for a while.'
Mickelson had never finished in the top 10 at the British Open. That was before his major breakthrough at Augusta in April, however, and he posted a 68 to finish third at 9-under-par 275.
Lee Westwood ran home an 20-foot putt for a birdie at the last to take fourth place at 6-under-par 278. Davis Love III holed his approach for an eagle at the 18th for his second straight top-5 finish at the British Open.
Love was joined by Levet in a tie for fifth at 5-under-par 279. Goosen and Scott Verplank were one shot further back at 4-under-par 280.
Woods was focused on the weekend, but only managed a 1-over 72 on Sunday. Nevertheless, the 28-year-old posted his first top-10 finish in a major since last year's Open at Royal St. George's.
Woods was joined by 2003 Masters winner Mike Weir in a tie for ninth at 3-under-par 281.