Scarlets looked well on course to put their defeat to Ospreys behind them and claim a fourth win in five matches after establishing a 20-5 lead following a brace of tries by winger Andy Fenby and 10 points from the boot of Wales international Rhys Priestland.
However, Treviso stunned their opponents as they drew level through converted scores from Fabio Semenzato and Robert Barbieri before fly-half Alberto Di Bernardo kicked a long-range penalty right at the end to snatch victory for the Italian hosts.
Treviso had lost three of their opening four matches in the competition and more disappointment seemed on the cards as Scarlets took charge of this match in the first half.
Priestland missed an early penalty but opened the scoring with a 13th-minute drop goal and then added the conversion after Fenby powered over for the game's first try in the 27th minute.
Benetton responded two minutes later when Alessandro Zanni charged down a Gareth Davies kick and Leonardo Ghiraldini took full advantage to cross, but the conversion was missed by Kris Burton.
Burton's error then gave Fenby the opportunity to claim his second try, the wing touching down after twice kicking the ball forward, and Priestland's extras saw Scarlets leading 17-5 at half-time.
That advantage was further extended by Priestland's 47th-minute penalty and a Welsh triumph looked inevitable at that stage.
But Benetton had other ideas and, after replacement scrum-half Semenzato and number eight Barbieri had crossed for converted tries to tie the scores, Di Bernardo sealed the win in dramatic fashion with a 50-metre penalty in the last minute.
Ospreys sealed their first home win of the RaboDirect PRO12 season as they overcame Munster 30-15 with a three-try performance at the Liberty Stadium.
The home side crossed through full-back Richard Fussell, hooker Richard Hibbard, and a penalty try, while fly-half Dan Biggar added 15 points with the boot.
Munster had replacement hooker Damien Varley sent off after 73 minutes for lashing out with his boot, but by then the writing was on the wall for the visitors, for whom Ronan O'Gara kicked 12 points, with his replacement Ian Keatley adding three.