A last-gasp touchline conversion by Chris Malone fired Bath into the Powergen Cup semi-finals and resulted in heartbreak for Sale at Edgeley Park.
Sale: 23 (10)
Tries: Jones, Titterell
Cons: Hodgson, Hercus
Pens:Hodgson, Hercus (2)
Bath: 24 (12)
Tries: Fea'unati, Stevens
Pens: Barkley (4)
The visitors were trailing 23-17 when replacement Matthew Stevens dived over to put Bath within a point of Sale in the fifth minute of injury time.
And despite the pressure and a tricky angle, Malone kept his composure.
Chris Jones' and Andy Titterell's tries had put Sale ahead before Isaac Fea'unati's effort set up the finale.
It was cruel luck on Sale - last year's beaten finalists - who lost fly-half Charlie Hodgson through flu at half-time and captain Jason Robinson with a leg injury 10 minutes from the end.
Bath rarely reached the Sale 22 in the first half - but when they did they made sure they came away with points, courtesy of the boot of Olly Barkley, who was also their most dangerous attacker.
And their 12-10 interval lead would have been greater had Malone and Matt Perry not both been off target with drop-goal attempts.
Malone was wide with another drop-goal attempt early in the second half, and Barkley's accuracy also finally deserted him when he missed with a fifth penalty kick at goal on 43 minutes.
The game appeared to take a decisive turn on 53 minutes when Mark Cueto re-gathered his own kick over the defence and found substitute hooker Titterrell, who neatly side-stepped his way past Matt Perry to touch down.
Another replacement, fly-half Mike Hercus, kicked the conversion and increased his side's lead to 20-12 with a penalty as Sale attempted to put the game to bed.
Barkley miscued another penalty and was also off target with the conversion after number eight Fea'unati was driven over for a 72nd-minute try.
Makeshift full-back Cueto pulled off one try-saving tackle before Stevens took Malone's floated pass to crash over at the corner - and Malone supplied the killer touch with the boot.
Bath coach John Connolly was quick to pay tribute to his match-winner after the game.
"One thing Chris doesn't lack is confidence," said Bath coach Connolly.
"It was a great effort from him. He showed good composure and came up with a great kick."
Meanwhile, Sale director of rugby Philippe Saint-Andre is hoping for a change of luck after his side suffered their third injury-time defeat of the season.
"I hope we will start to win some games this way," he said.
"I'm disappointed for the players. We showed character and worked hard. But we're a young team and still learning."
Sale: Robinson, Cueto, Baxendell, Todd, Mayor, Hodgson, Wigglesworth, Turner, Bruno, Stewart, Jones, Schofield, White, Carter, Chabal.
Replacements: Titterell, Halsall, Day, Lund, Redpath, Hercus, Rhys Jones.
Bath: Perry, Higgins, Crockett, Barkley, Daniel, Malone, Walshe, Barnes, Humphreys, Bell, Borthwick, Grewcock, Beattie, Lipman, Fea'unati.
Replacements: Mears, Stevens, Scaysbrook, Fidler, Abendanon, Davis, Williams.
Referee: Ashley Rowden (RFU)