The Llanelli side led 13-6 at half-time, with Kristian Phillips giving the visitors the advantage.
A Ben Howars try levelled the scores with less than 20 minutes to go.
Warriors added a second try with 12 minutes to go, with a third five minutes later.
Phillips brought Scarlets back into the game in the final minutes.
Neil Best ran in Warriors' fourth try in the final minute of the game to seal a 34-18 win for the home team.