Cape Town - The hosts were the better of the two teams in the first half as they harried Liverpool, who struggled to get their usual slick passing going.
It was a typically competitive clash but with few clear-cut chances and there were no shots on target before half-time.
The boisterous crowd had to wait until the 23rd minute for the first attempt on goal as Ross Barkley collected a pass from Ramiro Funes Mori and turned before dragging his shot wide of the left post from 20 yards out.
The Reds weren't allowed much time or space but a purposeful move on 27 minutes saw Georginio Wijnaldum shoot way over from just outside the 'D' after receiving the ball from Nathaniel Clyne on the left as the visitors switched play from the left.
Wijnaldum had a better opportunity four minutes later when Clyne's pass deflected into his path inside the box, but the Dutchman failed to make clean contact with the ball and Maarten Stekelenburg gathered easily.
Liverpool's best chance arrived on 37 minutes as Clyne fizzed in a low cross from the right that Divock Origi steered wide from 10 yards out in a move set up by Sadio Mane's acrobatic dummy.
Funes Mori should have given the Toffees the lead in the final minute of the opening half when he headed Barkley's corner wide from 10 yards out in an unmarked position.
The Reds made a positive start to the second half and Roberto Firmino forced Stekelenburg into a point-blank save after latching onto James Milner's ball over the top on 50 minutes.
Romelu Lukaku then threatened at the other end four minutes later with a glancing header from Gareth Barry's cross that went over an advancing Simon Mignolet but also the crossbar.
Leighton Baines had to be alert to deny Mane a shooting chance in the 57th minute as he intercepted Firmino's intended cross for the winger, before colliding with Stekelenburg, who was forced off through injury.
Mignolet was finally required to make his first save with 15 minutes remaining as he comfortably collected Ashley Williams' header from 14 yards out following Barkley's delivery into the area.
Firmino went for the spectacular two minutes later with a scissors-kick that flew well over the bar from Clyne's cross on the right, and the Brazilian was denied by a brilliant diving save from substitute keeper Joel Robles as he connected with Ragnar Klavan's downward header on the volley.
The Toffees had defended well throughout but they were cruelly undone in stoppage time when Daniel Sturridge's mis-hit effort across Robles struck the base of the right post and Mane reacted quickest to fire home the rebound from a few yards out to snatch the derby win.
Seamus Coleman made a last-ditch block to prevent Firmino from doubling the visitors' lead moments later as he diverted the Brazilian's shot wide of the right post on the slide.