The Tykes entered stoppage time with a seemingly invincible eight-point cushion, after Tom Biggs had grounded for their third try of the night late on.
But they had not counted on the league leaders’ amazing powers of recovery as Magnus Lund, Chris Mayor – who grabbed two tries on the night – and then Richard Wigglesworth went over in the space of four crazy minutes.
The four-try bonus-point success extends Sale’s advantage at the top over Wasps.
But bottom side Leeds, whose valiant defence for 81 minutes often defied belief, will wonder how they lost.
The Sharks had never been beaten by Leeds in a top-flight encounter – but that record looked in danger after just 60 seconds when the visitors’ number eight Nathan Thomas went over for the first try.
Leeds’ early tactic of bombarding Mark Cueto, playing in an unfamiliar full-back role, with high balls paid dividends straightaway when the England man fumbled Gordon Ross’ steepling kick into the hands of Thomas.
The Welshman had the simple task of grounding the ball beneath the posts, and Ross converted.
Valentin Courrent, starting at fly-half for the Sharks in place of the rested Charlie Hodgson, exchanged penalties with Ross before Leeds were forced to withstand a series of attacks in their 22.
The most dangerous of those saw Leeds prop Rayno Gerber miraculously haul down Cueto just yards from the try-line.
By that time, Hodgson had entered the fray after Courrent appeared to injure his shoulder colliding with the padded post.
But despite dominating the rest of the half, Sale could only trim three points off their opponents’ lead through a 37th-minute Hodgson penalty.
Replacement Jordan Crane was sentenced to 10 minutes in the cooler just before the break as Leeds’ repeated infringements tested referee Chris White’s patience.
Dean Schofield wasted a glorious chance to put Sale in front minutes after the restart when he inexplicably dropped an Ignacio Fernandez Lobbe pass two metres out with the line gaping.
Hodgson nailed his second penalty attempt in the 47th minute to make it 10-9, before Cueto’s crunching tackle on the effervescent Biggs in the left corner prevented a certain try for Leeds.
The visitors lost their lead in the 56th minute when a deft pass from scrum-half Sililo Martens fed replacement Mayor who powered through a yawning gap in midfield 30 yards out, outpaced the covering defence of Roland De Marigny and dived over under the posts.
Hodgson added the extras – but the Tykes were back in front in the 74th minute when Snyman found a gap in the Sharks three-quarter line before offloading to Ross who stretched every sinew to plunder over the line.
The Scot converted his own score to give his side a one-point advantage, and the game seemed safe after 78 minutes when Biggs collected Ross’ grubber kick on halfway and evaded Cueto’s tap-tackle to dive over for a converted try.
Then, though, came Sale’s injury-time revival.
First Lund, fed by Cueto, scurried over in the right corner to make it 24-21 – and then Mayor brought the house down by getting on the end of a length-of-the-field move down the left flank to outpace Jon Dunbar to score in the corner.
Replacement Wigglesworth ended a madcap spell by taking advantage of some sleepy defending to go over under the posts.