Wales produced a repeat of their Cardiff comeback to deny Gordon Strachan a winning start to his competitive Scotland managerial career.
Scotland started poorly but led through Grant Hanley's first-half header.
Wales' Gareth Bale had to be taken off, but Aaron Ramsey equalised from the spot as Robert Snodgrass was sent off.
And with the Scots reeling, Hal Robson-Kanu rose unchallenged to head home the winning goal for Wales, who had Ramsey sent off in injury time.
The victory lifts Wales up to third place in Group A but the Scots find themselves adrift at the bottom with no wins and just two points from five games.
The match ended in a similar fashion to Wales' as Chris Coleman's side came from behind to strike two late goals after Scotland needlessly conceded a penalty.
Their comeback on this occasion was all the more impressive given Bale's withdrawal at half-time.
Coleman's side played the better football for large swathes of the game, but Strachan will be bitterly disappointed that having clawed their way into a winning position, it was surrendered.
Wales certainly came out the blocks quicker and almost caught the Scots flat-footed as they threatened to take the lead inside a minute.
Ponderous defending allowed Ramsey the opportunity to power in a drive, which Hanley did superbly to block and a soft-looking free kick given against Craig Bellamy, with Allan McGregor grounded, brought an immediate end to the danger.
But there was a less welcome respite for the Scots moments later, as Steven Fletcher crumbled in agony following an innocuous aerial challenge with Ben Davies and had to be replaced by Kenny Miller.
Hanley epitomised the nervousness seemingly coursing through the Scotland side as he misjudged a ball back to McGregor and only just managed to atone by heading clear.
Almost quarter of the game had passed before Scotland fashioned a chance. Chris Burke's deep cross found Miller, but the striker's header flew over.
Burke, who had excelled in Strachan's first game in charge against Estonia, twice blew chances to pick out well-placed team-mates in front of goal, with too many Scots passes finding Welsh feet.
Bellamy and Bale were denied in quick succession by the bravery and quick reactions of McGregor, but Scotland were gradually finding their way into the game.
And though Boaz Myhill was untested by two more Miller headers, he was motionless as the Scots took the lead in first-half injury time.
Mulgrew curled a corner from the right to the back post and Hanley, brilliantly freeing himself from the shackles of Sam Ricketts, headed into the net from just a few yards.
Scotland emerged after the break a far brighter side than the one that had started the game, no doubt buoyed by the goal and the non-appearance of Bale for the second period.
Their initiative was almost rewarded by a beautifully struck Snodgrass effort, which thudded back off Myhill's post.
But this Wales side is not one to feel sorry for itself and though penalty claims for a handball by Hanley were hopeful, they were denied an equaliser when the referee Antony Gautier deemed McGregor had been fouled before substitute Andy King - on the park seconds before - swept into the net.
The game was turned on its head in a three-minute spell, starting with a foul by Snodgrass on Chris Gunter that brought him a second yellow card and - after a delay - a correctly-awarded penalty to Wales.
Ramsey hammered it in off the crossbar and with the Scots dazed, they were punished again as King floated in a cross from the right for Robson-Kanu to head emphatically past McGregor.
Scotland failed to threaten an equaliser, though James McArthur was cynically hauled down by Ramsey in the dying seconds, leading to the Welshman seeing a straight red.
Sadly for Scotland, Shaun Maloney blasted the free kick from 22 yards well over and Wales were left to take the acclaim of their fans.