The Scots came back 16-6 down after half-time to score 22 unanswered points and deny the Ospreys a bonus point.
The Ospreys got on the scoresheet through an early try from wing Jeff Hassler and Sam Davies, who kicked 11 points on his first Pro12 start.
Glasgow , who recalled seven internationals for the match, had plenty of ball early on but failed to capitalise after taking the lead through a Ruaridh Jackson penalty after only three minutes.
Though Glasgow had the stronger team on paper the Ospreys - who were without 17 players - took advantage of a misfiring line-out to take the lead in dramatic fashion on 17 minutes.
After mopping up the line-out on halfway the Ospreys moved the ball wide with Canada wing Hassler going over down the right.
Davies converted from wide out and then extended the home lead with a snap drop-goal. That cancelled out Jackson's second penalty shot as Ospreys led 13-6 at the interval.
The second quarter descended into a dull tactical battle with Glasgow continuing to have problems securing good quality line-out ball even with Jonny Gray and Ali Kellock in the second row.
Ospreys made the early running in the second half and were rewarded with a penalty for Davies on 53 minutes after a concerted run by the full-back into the Glasgow 22. That kick opened up a 10-point cushion.
But that was Ospreys' last points of the night as they unceremoniously leaked 22 points.
It all started with scrum-half Chris Cusiter being on the end of a runaway try after the Ospreys had hammered at the other end but failed to score.
And after that it was all Glasgow, helped by the fact that Ospreys lost hooker Scott Baldwin to the sin bin after Stuart Hogg had kicked a penalty.
Wing Van Der Merwe dotted down in the left corner on 69 minutes and with the last play of the match replacement Wilson crashed over to take a losing bonus point away from the home side.