Bath came from behind to grab a bonus-point win over Wasps, moving them up to sixth in the Premiership and the verge of a European Champions Cup place.
Three late tries, including two from Zach Mercer, saw them to victory, with Joe Cokanasiga also crossing.
They had led early on through a Jonathan Joseph try before Wasps hit back with scores from Nizaam Carr and Nathan Hughes in the first half.
Bath are a point ahead of seventh-placed Sale with a game to play.
They travel to Leicester in the last round of the regular season on 18 May, while Sale host play-off bound Gloucester.
Defeat for Wasps severely damaged their hopes of finishing in the top four, with Dai Young's side now four points behind Bath after Mercer's second try in additional time also denied them a losing bonus point.
Their last game is a tricky fixture at home to fifth-placed Harlequins, who still have a chance to finish in the top four.
Wasps may feel they were on the wrong end of some refereeing calls at The Rec when they were denied a sublime third try from a flowing team move towards half-time.
Josh Bassett's score off the left wing was adjudged to have been from a forward pass by centre Gaby Lovobalavu, who had earlier set up Carr and Hughes with eye-catching individual runs and offloads.
But after they spent the majority of the second half on the back foot, Bath finally made their pressure tell with three unanswered tries in eight minutes.
Bath attack coach Girvan Dempsey told BBC Radio Bristol:
"That last 10 minutes was crazy, but what I was really pleased with was the boys showed unbelievable character just to stick in there.
"I'm delighted for the guys as we've gone through some torment this season, that was a huge character test and the boys stood up to it.
"We applied ourselves tremendously in the last 20 minutes and then again in the latter stages.
"We'll look back on this season and it will be a case of 'what ifs' as there's been a lot of those."
Wasps director of rugby Dai Young told BBC Radio 5 Live:
"I'm really disappointed that we've come away with nothing. For 70 minutes, we were excellent and I couldn't have asked any more of the boys.
"We were under pressure in big parts and we dug in and defended really well. When we had the ball, we showed some real quality in attack and scored some tremendous tries.
"The last eight or nine minutes, things we talked about we didn't deliver on and we gave away some silly penalties.
"We've got to look at ourselves for that."
Bath: Watson; Cokanasiga, Joseph, Roberts, McConnochie; Burns, Chudley; Obano, Dunn, Lahiff, Attwood, Ewels (capt), Ellis, Underhill, Mercer.
Replacements: Batty, Van Rooyen, Nixon, Douglas, Stooke, Fotuali'i, Davies, Wright.
Wasps: Le Roux; Watson, De Jongh, Lovobalavu, Bassett; Miller, Simpson; McIntyre, Cruse, Brookes, Launchbury, Rowlands, Shields, Carr, Hughes.
Replacements: Taylor, Harris, Cooper-Woolley, Morris, Johnson, Hampson, Sopoaga, Neal.
Referee: Luke Pearce.
For the latest rugby union news follow @bbcrugbyunion on Twitter.