Bath had won by five points in rainy, windy Llanelli back in October and began the night top of the pool, level with Toulon on 13 points and one ahead of Scarlets.
But on a dry night in Bath, the home team had no answer to the dazzling running and passing rugby of the visiting Welsh team who secured a bonus point for four tries before the hour mark.
Scarlets took the lead after 12 minutes, sweeping the length of the field in a move that giant lock Tadhg Beirne finished by side-stepping to the line.
“I don’t know where that came from,” Beirne said after the match. “I went for it and it worked out.
The match pivoted on an incident 10 minutes later. Bath winger Matt Banahan stormed through but, with the ball just short of the Scarlets’ line, John Barclay broke up the play, preventing a try but earning a yellow card.
Yet the punishment benefited Scarlets. In the 10 minutes they were a man short the Welsh team kept the ball in hand, ran Bath ragged and scored two tries, the first by Paul Asquith and the second by Hadleigh Parkes.
Scarlets continued to dominate at the start of the second half and spent nearly 13 minutes close to the Bath line before Dan Jones collected a low kick from Rhys Patchell to score the bonus-point try.
Bath salvaged a little pride with tries by Banahan and Zach Mercer, but the defeat takes qualification for the quarter-finals out of their hands.
Toulon host Treviso on Sunday in the other match in the pool, but even if the French team win and take first place, they must visit Llanelli in the final round.
A home victory would secure first place for Scarlets and make them first Welsh team to reach the last eight since Cardiff five years ago.
“It’s knockout rugby now,” said Beirne.