Ulster's hopes of reaching the Pro12 play-offs are still alive thanks to an 80th-minute match-winning try by centre Ian Whitten.
Treviso had looked set to complete a double over Brian McLaughlin's men as they led 23-20 in the closing stages.
Earlier, Enrico Ceccato's opening try had boosted Treviso but back row Chris Henry touched down for Ulster.
A try by Alberto di Bernardo in the 69th minute rocked Ulster but they got the win with Whitten's last-gasp score.
"It was a far from perfect performance but I thought that we showed tremendous character to pull back and get the away win against a side that was full of Italian internationals," said Ulster coach Brian McLaughlin.
"We put them under a fair bit of pressure in the first five minutes but then we turned the ball over the ball which they hacked down the pitch to score a fairly soft try and put us 7-0 down at the start.
"Treviso threw everything at us and in the first half our scrum was under a little bit of pressure but we sorted that in the second half and we scrummed well.
"Paddy Wallace scored a magnificent try around the 70 minute mark to put us right back into the mix and bring us from 23-13 down right up to 23-20 once Ruan added the conversion, and thankfully there was enough time on the clock for the winning try.
"It was by no means a top-class performance but we showed a lot of self-belief to get the win we so badly needed to keep us in contention for a play-off spot."
Treviso: B Williams, T Iannone, A Sgarbi, G Garcia, L Nitoglia, K Burton, E Gori; R Barbieri, A Zanni, M Vosawai, C Van Zyl, A Pavanello (cpt), L Cittadini, E Ceccato, M Rizzo.
Replacements: F Sbaraglini, M Muccignat, I Fernandez Rouyet, V Bernabo, F Minto, G Padro, F Semenzato, A Di Bernardo.
Ulster: A D'Arcy, C Gilroy, D Cave, P Wallace, S Terblanche, I Humphreys, R Pienaar; T Court, A Kyriacou, J Afoa, J Muller (cpt), D Tuohy, C Henry, W Faloon, R Diack.
Replacements: N Brady, P McAllister, A Macklin, L Stevenson, N McComb, P Marshall, I Whitten, N Spence.