An injury-time kick from replacement Ceri Sweeney saw the Warriors go top of the Celtic League alongside Ulster.
Warriors (13) 16
Try: C Harris
Cons: N Jenkins
Pens: Jenkins (2), C Sweeney
Scarlets (6) 15
Pens: G Bowen (5)
A first-half try from Cory Harris helped the home team to a 13-6 half-time lead, but the Scarlets fought back furiously.
Gareth Bowen kicked his fifth penalty from five attempts in the 80th minute to edge the visitors ahead, but the Warriors hit back with Sweeney's kick.
Neil Jenkins missed a first-half kick to end a run of 44 successful goals.
It was a scrappy start to the game at the Brewery Field, with neither side threatening the scoreboard in the opening quarter.
Even Jenkins' boot was out of sorts, the fly-half pushing a 23rd-minute penalty wide for his first miss since 31 October.
But moments later Maama Molitika charged from a line out, splitting the Scarlets defence before popping to Harris who
crossed for his try.
The rest of the half was dominated by the whistle of referee Simon McDowell, Bowen and Jenkins trading penalties to
leave it at 13-6 at the break.
Early in the second period a great break from deep in his own half by Matthew Watkins sent Barry Davies on a clear run to the
The full-back was chased all the way by Dafydd James, though, who hauled Davies down yards short, although the third Scarlets
penalty came from the breakdown.
It was the cue for a Scarlets rally, with Watkins and Dwayne Peel going close and Bowen edging them to within a point with
his fourth penalty.
The home side looked in control going into the final minute of normal time, but after losing turnover ball they gave Bowen his fifth penalty
when they offended at the ensuing ruck, giving the visitors the lead for the first time in the game.
The Warriors immediately charged back downfield, won a penalty, and saw Sweeney fire them to victory with a nerveless
He had a chance to add a try with the last move of the game, intercepting Scarlets ball and hacking through, but the fly-half knocked on as he went for the touchdown.
"Dubious decisions from the referee changed the result for us," said a disappointed Scarlets coach Gareth Jenkins.
"In tight games like this we want to see fair and consistent refereeing."
Warriors scrum-half Sililo Martens was pleased to come through a tight game.
"The forwards played really well," he told BBC Sport Wales. "We did the basics right and that won us the game."
Warriors: G Wyatt; D James, S James, J Bryant, R Mustoe; N Jenkins, S Martens; C Loader, M Rees, C Horsman, D Jones, R Sidoli, M Molitika, C Harris, R Bryan.
Replacements: M Davies, M Jones, R Parks, R Jones, N Kelly, P John, C Sweeney.
Scarlets: Barry Davies; Mike Phillips, Tal Selley, Matthew Watkins, Richard Rees; Gareth Bowen, Dwayne Peel; David Maddocks, Robin McBryde, John Davies, Vernon Cooper (capt), Adam Jones, Emyr Lewis, Gareth Williams, David Hodges.
Replacements: Mark O'Kelly, A Yelland, Chris Wyatt, Bryn Griffiths, Dale Burn, Gavin Evans, Ceiron Thomas.
Referee: Simon McDowell (Ireland)