Ulster once again got out of jail as they extended their unbeaten league run to nine games.
Leading 16-15 as the match entered its dying embers, they were twice let off the hook as a wasteful Treviso spurned two penalty attempts at the death.
Before all that, young Ulster full-back Peter Nelson scored his first try for the province, while Niall O'Connor chipped in with an impressive 11 points.
But if Ulster were slightly lucky last week against Zebre, they were blessed this time to come away with a win.
Treviso were without 20 senior players for this tie but on the first-half evidence, one never would have guessed.
Boosted by the return of full-back Brendan Williams, they looked sharper than an Ulster side who struggled to find their rhythm, and out-scored the league leaders two tries to one. It was Williams himself who scored the first, a fine counter-attack on seven minutes which he both started and finished.
Gradually, though, Ulster got into the match and after a settling penalty by O'Connor, they too crossed the chalk, a first senior try for 20-year-old Nelson. The try was a direct result of a trademark tap penalty from Paul Marshall, superb support play from Tom Court and a spectacular dive for the line from the youngster.
O'Connor converted but Ulster were unable to build on their momentum.
They coughed up a silly penalty which Alberto Di Bernardo converted, and then let their guard slip right on the stroke of half-time allowing Ludovico Nitoglia in for soft try – all of which left Ulster trailing 15-10 at the interval.
Ulster were sharp out of the blocks for the second half, and O'Connor reduced the deficit with another penalty.
O'Connor missed one kickable effort but then cracked over a superb long-range strike to nudge his side ahead 16-15.
The game was balanced on a knife-edge and Di Bernardo went inches short with a long-range penalty 10 minutes from time and missed a simple effort from just beside the posts in the dying moments.
Treviso – B Williams (J Ambrosini 61); G Toniolatti (L Morisi 76), C Loamanu, A Vilk, L Nitoglia (A Pratichetti 52); A Di Bernardo, F Semenzato; M Muccignat (I Fernandez-Rouyet 43), F Sbaraglini (E Ceccato 56), B Roux; M Fuser, C van Zyl (capt); V Bernabo, P Derbyshire, M Filippucci (F Giusti 23).
Ulster – P Nelson; A Trimble, J Payne, P Wallace, M Allen; N O'Connor, P Marshall; T Court (C Black 64), R Herring (N Brady 67), D Fitzpatrick (J Afoa 41); R Diack, N McComb; N Williams, M McComish, R Wilson.
Ref – P Allan (SRU).