Alberto di Bernardo's last gasp penalty secured victory for Treviso, who hit back to beat Scarlets at Stadio di Monigo.
Scarlets were leading 17-5 at the interval following Andy Fenby's two tries while Leonardo Ghiraldini crossed for Treviso.
Treviso got back into the game with tries by Robert Barbieri and Fabio Semenzato.
They were trailing until the final minute when di Bernardo kept his nerve.
Treviso had lost three of their opening four matches while their Welsh opponents had won three of their previous four games.
Rhys Priestland missed an early penalty but opened the scoring with a 13th-minute drop goal.
The Wales fly-half then added the conversion after Fenby powered over for the game's first try in the 27th minute.
But Treviso responded two minutes later when Zanni charged down a Gareth Davies kick and Leonardo Ghiraldini took full advantage to cross,
The conversion was missed by Kris Burton, whose error then gave Fenby the opportunity to claim his second try.
The Scarlets wing touched down after twice kicking the ball forward, and Priestland's extras saw the visitors leading 17-5 at half-time.
That advantage was further extended by Priestland's 47th-minute penalty but Treviso were far from finished.
Replacement scrum-half Semenzato sneaked over on 51 minutes for his side's second try, converted by Di Bernardo.
The Scarlets were by now being penned back and Barbieri, scorer of two tries against Cardiff Blues, added a third try with 13 minutes remaining
Di Bernardo converted from out wide to cut the visitors advantage to one point and set up a thrilling finale.
Scarlets captain Rob McCusker was shown a yellow card with eight minutes remaining his side were to pay the price.
A penalty was awarded against Johnathan Edwards on the halfway and fly-half di Bernardo held his nerve to kick a 50-metre penalty right at the end.
The defeat was Scarlets' second successive Pro12 defeat but Simon Easterby's side remain second in the table.
Treviso: McLean, Benvenuti, Sgarbi, Morisi, Iannone, Burton, Botes, Barbieri, Zanni, Derbyshire, Bernabo, Pavanello, Cittadini, Ghiraldini, Rizzo.
Replacements: Di Bernardo for Morisi (13), Filippucci for Iannone (64), Semenzato for Burton (41), Budd for Bernabo (54), Rouyet for Cittadini (54), Sbaraglini for Ghiraldini (62), Di Santo for Rizzo (54).
Not Used: Minto.
Scarlets: J. Williams, L. Williams, Maule, J. Davies, Fenby, Priestland, G. Davies, McCusker, J. Edwards, Turnbull, Earle, Timani, Manu, Rees, John.
Replacements: K. Phillips for L. Williams (60), Shingler for Turnbull (54), Murphy for Timani (70), Lee for Manu (67), Owens for Rees (63), P. Edwards for John (63).
Not Used: Knoyle, Warren.
Sin Bin: McCusker (71).
Referee: Andrew McMenemy (SRU)
Assistant referees: Carlo Damasco, Simone Boaretto (both FIR)
Citing commissioner: Maurizio Vancini (FIR)
TMO: Alan Falzone (FIR)