Dan Evans’ early try put Scarlets ahead and Lee Williams added their second, but DTH van der Merwe and Calum Forrester had replied in between.
Stephen Jones’ try just after the break made him Scarlets’ highest-ever points scorer and restored the lead.
But Hefin O’Hare and Bernardo Stortoni tries secured a bonus-point victory.
With Ospreys easing to victory over Dragons, it means that Glasgow must rely on Edinburgh beating leaders Leinster today to claim a home tie in the semi-finals by finishing in the top two.
The Scarlets opened the scoring after eight minutes, when Dan Evans went over for an unconverted score, and Parks reduced the arrears three minutes later.
Van der Merwe found the space to score Glasgow’s opening try following a neat pass by Parks, who added the conversion to extend the lead to 10-5.
Jones replied with a penalty, but Forrester added the visitors’ second try on the half-hour mark, with Parks converting.
And after Williams wriggled over in the corner for an unconverted score Jones eased over under the posts and add the conversion to create his new points record. Then a crossfield kick from Parks found O’Hare and he off-loaded to Stortoni to score under the posts.
Scarlets scorers: Tries: Evans, L. Williams, S. Jones. Cons: S. Jones. Pens: S. Jones 5.
Glasgow scorers: Tries: van der Merwe, Forrester, O’Hare, Stortoni. Cons: Parks 4. Pens: Parks 3.
SCARLETS: Evans, Lamont, King, J. Davies, L. Williams, S. Jones, Roberts, I. Thomas, Rees, R. Thomas, Cooper, Day, McCusker, Turnbull, Lyons.
Replacements: Priestland for Lamont (64), Fenby for L. Williams (43), Knoyle for Roberts (53), Owens for Rees (63), Reed for Day (53).
GLASGOW: Stortoni, van der Merwe, O’Hare, Morrison, Dewey, Parks, Cusiter, Tkachuk, Thomson, Low, Gray, Kellock, Forrester, Brown, Beattie.
Replacements: Horne for Dewey (67), Hall for Thomson (53), Kalman for Low (61), Turner for Gray (53), Eddie for Forrester (65).
Referee: James Jones (WRFU).