Matt O'Connor's men looked home and hosed by half time at the Ricoh Arena after Fergus McFadden and Isaac Boss tries put them in a commanding 20-6 lead.
However, Matt Mullan and Nathan Hughes hauled the English side back in it and if not for a miscued Andy Goode drop-goal in the dying moments, Leinster would have been facing a treacherous away trip.
As it is Leinster will be welcoming Bath to the RDS in April, and man-of-the-match Luke Fitzgerald admits there is plenty of room for improvement between now and then.
"I'm pretty disappointed considering I thought we were in good position going in at half-time, albeit with one guy down for the next ten minutes," said the winger.
"Credit to Wasps, I thought they came back and controlled the game very well in the second half, had a lot of possession which is probably something we weren't looking for them to have as they have a lot of dangerous ball carriers.
"There were some disappointing aspects but at the end of the day we're through, which is great."
Bath earned a tie with Leinster after overcoming Glasgow Warriors, as Gregor Townsend and company failed to build on a flying start before going down 20-15 at the Rec.
Alex Dunbar scored inside the first five minutes and while a slick Richie Vernon try followed early in the second half, Bath's pack - which won two penalty tries - and George Ford's boot proved the difference.
In a GUINNESS PRO12 European battle, Benetton Treviso shocked league leaders Ospreys by mounting a sensational comeback to win 23-20, a last-minute penalty try doing the damage.
And despite already being out of contention, two Irish regions in Munster and Ulster certainly made a statement with crushing wins.
Munster notched nine tries including Simon Zebo and Andrew Conway doubles to hammer Sale Sharks 65-10, while Darren Cave grabbed a hat-trick as Ulster brushed aside Leicester Tigers 26-7.
There will be four GUINNESS PRO12 representatives in the quarter-finals of the Challenge Cup and none more impressive than Newport Gwent Dragons, who look intent on collecting European silverware.
The Welsh region racked up their fifth win in six in Europe and a home quarter-final against Cardiff Blues, as Tom Prydie slotted five penalties in a 30-19 win.
The Blues meanwhile are through to meet the Dragons at Rodney Parade after Lloyd Williams and Josh Navidi tries bookended a stellar 28-3 away-day win against Grenoble.
Sam Hidalgo-Clyne continued to justify his Scotland selection with a club record 28 points in an eye-catching 38-20 triumph for Edinburgh over Bordeaux-Begles, with a trip to London Irish now lying in wait.
And Connacht's reward for seeing off La Rochelle 30-20 - needing to call upon two late tries from Niyi Adeolokun and Matt Healy - is a visit to Gloucester's Kingsholm.
Follow us on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the GUINNESS PRO12
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland