Jonny Sexton kicked all Leinster's points as the Heineken Cup holders held off a spirited Bath challenge to extend their lead at the top of Pool Three.
The English side enjoyed the better of the first half with Olly Barkley kicking them into a 6-0 lead.
Leinster wasted some golden openings but built a six-point lead through four Sexton penalties.
Bath countered with a brilliant Matt Banahan try to go one point ahead but two Sexton penalties settled the match.
The defeat, coupled with Glasgow's victory over Montpellier, leaves Bath staring at an early exit from the competition.
The English side travel to Dublin next Saturday needing to turn the tables on Leinster to stand a realistic chance of securing a quarter-final place.
RaboDirect Pro12 leaders Leinster almost took the lead at the Rec with a wonder-try in the first five minutes when Luke Fitzgerald led a lightning counter-attack which broke down just yards from the line.
Bath soon assumed control of the game and, after going ahead through a Barkley penalty, they spent much of the half camped in the Leinster 22.
But the constant pressure did not lead to tries as the Irish side's defence held strong.
Barkley doubled the lead with a second penalty before Sexton reduced the deficit to 6-3 at half-time.
Leinster came out flying after the break, only for flanker Sean O'Brien to waste a golden opportunity, ignoring a three-man overlap after wing Isa Nacewa's pace and awareness had set up the chance.
The Irish team continued to heap pressure on the Bath defence, yielding three penalties from which Sexton kicked his team into a six-point lead.
Bath, though, had other ideas, and they hit back 15 minutes from time with a stunning try.
Francois Louw initiated the move with a turnover and the ball was swept out to Jack Cuthbert on the right wing. His offload back infield set up Banahan to power over the line.
Barkley added the extras to give Bath a one-point lead going into the last 10 minutes.
Louw then went from hero to villain as he gave away the penalty from which Leinster took the lead before receiving a yellow card for infringing with five minutes on the clock.
Sexton's sixth successful penalty out of seven kept the champions on course to reach their third final in four seasons.
Bath rugby director Sir Ian McGeechan said: "I am very proud of the players - their attitude was superb. We defended tremendously well, restricting them to penalties, and it is about the small margins.
"We made one or two errors. They got the ball into the right areas quickly and put pressure on.
"We probably didn't have quite that same amount of extended pressure, but we scored a very well-executed try, and that showed the attitude was really positive.
"The work-rate when we didn't have the ball was superb, and our attacking play was very encouraging. We just need to have a bit of composure at key times, but it is a relatively new team with new combinations, and that is what you grow towards.
"I think it took Leinster probably three or four years to get to that point. You don't get there overnight."
Leinster head coach Joe Schmidt: "The frustration was that we couldn't get the ball over their line. We appeared to have a couple of gilt-edged chances.
"We want to be a lot more accurate to make sure we finish opportunities that we create, but I am delighted with the result.
"Against a quality team it's hard to create opportunities, and the last thing you want to do is butcher them like we did today. We almost suffocated ourselves at times."
Bath: Abendanon, Cuthbert, Hipkiss, Barkley, Banahan, Donald, Claassens, Flatman, Biller, Wilson, Attwood, Caldwell, Louw, Mercer, Taylor.
Replacements: Vesty for Hipkiss (63), Cook for Claassens (67), Catt for Flatman (75), Spencer for Wilson (75). Not Used: Beech, Perenise, Beattie, Heathcote.
Leinster: R. Kearney, Nacewa, McFadden, D'Arcy, Fitzgerald, J. Sexton, Boss, van der Merwe, Strauss, Ross, Cullen, Browne, McLaughlin, O'Brien, Heaslip.
Replacements: O'Malley for D'Arcy (70), Reddan for Boss (67),Healy for van der Merwe (40), Cronin for Strauss (67), White for Ross (67), Jennings for Browne (52), Toner for McLaughlin (52).
Not Used: Madigan.