The Scarlets now need to beat Treviso next Friday night to secure that play-off place.
Davies' tries came in each half and the third score came from full-back Liam Williams, while the Blues could only manage two penalties from the boot of Leigh Halfpenny.
The Scarlets made a late change at tight-head prop with Samson Lee and Jacobie Adriaanse swapping places in the 23-man squad.
There were two significant inclusions on each team's replacement bench. For the Scarlets Rhys Priestland was named after recovering from an Achilles injury in January.
Cardiff selected Bradley Davies after shaking off an ankle ligament problem.
After a frenetic half of rugby the Blues would have been content to be just 10-6 down at the interval with the Scarlets having a territorial edge as well as dominance in the scrum.
In a breathless opening four minutes both teams attacked at every opportunity.
The Blues were caught offside to give the Scarlets the first scoring opportunity but fly-half Owen Williams was just wide with his kick from just in his own half.
But it was the Blues who went into the lead on 18 minutes when wing Owen Williams was tackled by prop Phil John without the ball and Wales full-back Halfpenny found the target with his first penalty.
A side-step and sprint through a gap saw Wales centre Jonathan Davies go behind the scrum for Williams to convert, while in the final five minutes of the half Halfpenny and Williams swapped penalties to give the home side a four-point lead.
The start of the second half became a game of cat and mouse with lots of tactical kicking but eventually the stalemate was broken.
A good move from a scrum ended with Jonathan Davies bursting over from eight metres.
And seven minutes later Liam Williams exploited a huge gap in midfield to go over for the third try converted by Priestland, who played the final 15 minutes, which was enough to seal the Scarlets a hard-fought victory with 14 minutes to go.