The Welsh side, who scored seven tries at the Liberty Stadium in a 47-10 victory against the bottom side, must now win their final two matches against Cardiff Blues and Ulster - probably with bonus points - and hope other results go their way if they are to make it into the all-important top six.
The Ospreys' tries came from full-back Dan Evans, who scored twice, number eight Dan Baker, centre Owen Watkin, flanker Olly Cracknell, wing Hanno Dirksen and replacement Ben John. Dan Biggar supplied 12 points with the boot.
Treviso, who finished the match with 14 men after replacement Dean Budd was sent off for two yellow cards, scored a try from centre Alberto Sgarbi, with full-back Jayden Hayward kicking a penalty and Sam Christie providing a conversion.
Ospreys snatch win with late Rhys Webb double
Injury-hit Ospreys, who moved up a place to eighth, were without 14 players, with Canada wing Jeff Hassler the latest to be ruled out along with Alun Wyn Jones, Justin Tipuric, Paul James and Sam Underhill.
Ospreys led 21-3 by half-time and had dominated the first half to score three of the four tries they needed for the bonus-point win.
Despite having problems in the scrum, Ospreys opened their account after nine minutes when Evans burst into the line and ran through two tackles to get across the line. Biggar converted.
With only two PRO12 wins to their name all season, the Italian side got on the scoreboard with a Hayward penalty but Ospreys responded with a try for Baker from a line-out drive. Biggar added the extras to put the home side 14-3 ahead.
Five minutes later Ospreys were well on their way to a bonus point with a try for Watkin converted by Biggar.
Play was held up just before half-time when hooker Ornel Gega was taken from the field on the stretcher, and when the clock restarted Baker went agonisingly close to grabbing the bonus-point try.
Treviso suffered a double setback after 48 minutes and 52 minutes when Budd and number eight Robert Barbieri were sin-binned for professional fouls.
With Ospreys having two extra men, Rhys Webb took a quick tap penalty to put Cracknell over for the bonus point. Biggar's fourth conversion saw the home side lead 28-3 after 54 minutes.
A minute later Ospreys were 33-3 ahead after Dirksen finished off a fine counter-attack for an unconverted score.
With Treviso back to 15 players they grabbed a try after 67 minutes through Sgarbi, with Christie adding the conversion.
But they were back to 14 men with five minutes remaining when Budd received a red card - his second yellow - for a swinging arm.
Four minutes from time full-back Evans squeezed in for his second try and the Ospreys' sixth, and in the final minute John latched on to Biggar's kick ahead for the seventh try. Biggar also supplied his sixth conversion.
Ospreys pile on the points to stay in European Champions Cup hunt
Ospreys have wing clipped as Jeff Hassler undergoes shoulder surgery