Frank Ross came off the bench to score direct with an inswinging corner three minutes into stoppage time to send the Morton fans into raptures and drop Dundee United out of the play-off spots.
United are now fifth but have two games in hand over fourth-placed Dunfermline.
Mark Russell was first to threaten for Morton, when after just five minutes he fired a 20-yard drive just over goalkeeper Harry Lewis’s crossbar.
United should have taken the lead in 12 minutes when Billy King darted down the left and his chip inside was cleverly stepped over by Scott McDonald to Paul McMullan. He took a return pass from King but ‘Ton goalkeeper Derek Gaston threw himself full length to his left to turn the ball round low down.
Gaston was in action again in 29 minutes when Thomas O’Ware was slack with a pass in midfield and lost the ball to the razor sharp McDonald, who ran on and slipped the ball to his right for McMullan, who was unmarked in space, but his angled drive from close range was superbly turned round by the Cappielow ‘keeper.
Then, in 35 minutes, it was King’s turn to test Gaston with a fierce right foot drive from 18 yards.
One minute from the break McDonald fired wide from 25 yards as United tried desperately to break the deadlock.
Seconds later, United created their best opportunity of the first period, in which they dominated, when McDonald curled the ball from 18 yards, forcing the outstanding Gaston into another superb save. Matthew Smith following up had the goal gaping, but shot into the side-net from 10 yards.
Morton showed more impetus after the break and in 56 minutes a Gary Harkins floated free-kick from the left found Gary Oliver, but his flashing header went wide.
But three minutes later United finally got the breakthrough when McMullan whipped over a corner from the left for former Rangers defender Bilel Mohsni, who jumped unchallenged eight yards out and headed the ball into the net via the underside of the crossbar.
One minute from time Morton should have levelled but substitute Robert Thomson hooked the ball wide.
United boss Csaba Laszlo said: “I have to believe we have thrown away three points because it has happened. We controlled the game for 90 minutes and I don’t understand where the referee got six minutes stoppage time from.”