They were on course to wipe away the memory of last week’s hammering by Llanelli Scarlets until the Ospreys staged a stunning finish.
Both sides made mistakes in the untidy opening sparring session before Edinburgh seized control.
They were left frustrated, however, when Marcus Di Rollo spilled the ball with the line at his mercy in the wake of slick work by Mike Blair.
Blair was back in the spotlight to help set up the first try for winger Hugo Southwell, who found extra strength to stretch to the target after being blocked short. Ander Monro slotted the conversion – only to see the Ospreys burst back into the contest.
Shaun Connor sent the Gunners defence into a flap with a beautifully-weighted crosskick for Stefan Terblanche to gather.
And following a bout of quick inter-passing it was centre James Storey who claimed the try.
Gavin Henson missed the conversion but made amends with a penalty shortly afterwards.
Even worse was to come for Edinburgh six minutes before the break when Terblanche ploughed over for try number two, goaled by Henson.
Gunners came to life immediately after the restart as they created two great tries to seize the initiative.
First, Dougie Hall drove over following powerful work by captain Nathan Hines – then Southwell sprinted out of his own danger-zone to collect his own chip and score. Monro added both goals.
Henson (two) and Monro then swapped penalties as the match entered the final quarter.
And when Craig Joiner darted over to make sure of the bonus point, with Monro converting, the Ospreys challenge appeared to be over.
But touchdowns by Andy Millward and Richard Pugh, converted by Henson, left them stunned.