The Welsh visitors led 16-11 at half-time after two tries from Scotland wing Nikki Walker and two penalties from Dan Biggar. Richie Gray crossed for the hosts with Ruaridh Jackson adding two penalties.
But the Warriors stepped it up after the break as Richie Vernon and Kevin Tkachuk claimed tries to give them breathing space, before Walker completed his hat-trick late on as the Ospreys missed out on a losing bonus point.
It looked as though Glasgow were going to be on the wrong end of a serious hammering in the early stages as nothing went right for the home side from woeful handling to non-existent tackling.
Glasgow scorers: Tries: Gray, Vernon, Tkachuk. Cons: Weir 2. Pens: Jackson 3, Weir.
GLASGOW: Stortoni, Shaw, M. Evans, Morrison, Dewey, Jackson, Gregor, Welsh, Hall, Low, Gray, Muldowney, Harley, Barclay, Vernon.
Replacements: Horne for Dewey (49), Weir for Jackson (61), Tkachuk for Welsh (77), Thomson for Hall (36), Kalman for Low (41), Forrester for Muldowney (57), Ryder for Harley (64).
Ospreys scorers: Tries: N. Walker 3. Cons: Biggar. Pens: Biggar 2.
OSPREYS: Byrne, N. Walker, Bowe, Hook, Fussell, Biggar, M. Phillips, James, Bennett, A. Jones, Gough, Evans, Collins, Tipuric, R. Jones, Prydie.
Replacements: Prydie for Byrne (13), Nutbrown for M. Phillips (60), Bevington for James (41), M. Davies for Bennett (52), Mitchell for A. Jones (41), Goode for Gough (77), Holah for Tipuric (52), Parker for Prydie (64).
Referee: David Wilkinson (Ireland).