For long spells it looked as if the Gunners’ domination of possession would count for nothing as the streetwise Scarlets used all their know-how to stay in touch.
However, home stand-off Ally Warnock atoned for several missed kicks with a try double to give the Scots a deserved triumph.
Llanelli took just three minutes to open the scoring, Salesi Finau sending Lee Byrne over, for Gareth Bowen to convert.
However, after Bowen and Edinburgh counterpart Warnock had traded penalties, the home side stormed ahead with two tries in quick succession.
Winger Simon Webster was first to breach the Scarlets defence from Alan Jacobsen’s pass and five minutes later Warnock finished off a fine move involving Ally Hogg and Graeme Burns.
However, Warnock’s failure to convert either try enabled Michael Phillips to level the match with a drop goal on the stroke of half-time.
The Gunners, who had enjoyed the bulk of first half possession, showed no sign of easing up on the restart and they notched their third try through former Scotland centre Craig Joiner.
Warnock converted before Bowen reduced the lead to 20-16 with a long range penalty for the Scarlets.
However, Warnock sealed a famous win for Edinburgh when he broke through on the blind side to touch down with just a few minutes remaining