Treviso scored two late tries to deny Ospreys a first away win in the Heineken Cup since December 2009.
The visitors were leading 14-3 with five minutes remaining following Tom Isaacs' try on 58 minutes.
But Treviso's late fightback culminated in tries for Alessandro Zanni and Andrea Pratichetti, which were converted by Kris Burton.
Dan Biggar scored two penalties and a drop goal for the Ospreys.
The dramatic late victory was Treviso's first win in this season's Heineken Cup but they finished bottom of Pool 2.
On a heavy pitch caused by overnight rain, the match was a contest between two sides already out of contention.
The Ospreys were forced to make a last minute change with wing Eli Walker pulling out with a hamstring injury.
Walker was replaced by 21-year-old Ben John who was handed his first Heineken Cup start.
The home side started brightly and a promising passage of play resulted in their first points, a Kris Burton penalty.
That was an early warning for the Ospreys but a Dan Biggar penalty levelled the scores four minutes later.
And following a period of pressure by the visitors another successful Biggar penalty gave them the lead for the first time.
Both sides threatened in a frantic close to the half but the score remained unchanged at the interval.
The Ospreys almost extended their lead when Kahn Fotuali'i powered through but the scrum-half was held up short.
They continued to pile on the pressure following the ensuing scrum with Biggar adding a drop-goal before Isaacs scored the game's opening try.
Ben John burst through Ludovico Nitoglia and offloaded inside to Fotuali'i, who demonstrated quick hands to release Isaacs for the score.
Treviso refused to give up and they came close to a try, which referee Greg Garner was unable to award after inconclusive replays.
But they eventually manufactured a breakthrough as Zanni powered over followed by Burton's conversion to set up a tense finale.
And with a minute remaining Giulio Toniolatti and Valerio Bernabo were both prominent in the build-up to Pratichetti's match-winning try, which Burton successfully converted.
VIEWS FROM THE DRESSING ROOM
Ospreys forwards coach Jonathan Humphreys:
"It's a tough one to take but we've got a lot of young kids playing out there. It's a huge learning curve for us. We've talked about us being stronger and we will be.
"But fair do's to them. They had a lot of subs to come on who made a difference for them and sadly we didn't have the same firepower to do that.
"When you lose games in the last minute you've got to take it on the chin - we've won games."
Benetton Treviso: McLean, Nitoglia, Benvenuti, Sgarbi, Toniolatti, K. Burton, Gori, Rizzo, Maistri, Cittadini, Minto, Bernabo, Derbyshire, Zanni, Barbieri.
Replacements: Pratichetti for Nitoglia (59), Semenzato for Benvenuti (59), De Marchi for Rizzo (56), Ceccato for Maistri (56), Rouyet for Cittadini (75), Fuser for Derbyshire (64), Budd for Barbieri (57).
Not Used: C. van Zyl.
Ospreys: Fussell, Grabham, Isaacs, Bishop, Walker, Biggar, Fotuali'i, D. Jones, Baldwin, A. Jones, Peers, King, J. Thomas, Lewis, Bearman.
Replacements: Bevington for D. Jones (62), Johnstone for A. Jones (75), Stowers for Peers (75).
Not Used: Dwyer, Gough, Webb, Morgan, Spratt.
Ref: Greg Garner (England).