Sub Peter Beadle volleyed in a Bristol City equaliser deep into injury time to stretch their unbeaten run to 17 games.
Referee Mark Cooper added five minutes to the second half and in a dramatic finale sent off Luton defender Sol Davis before Beadle swept in his goal.
Davis was red carded for a reckless challenge on winger Scott Murray, whose speed and invention on the right flank had kept City's hopes alive.
They had fallen behind to a 53rd minute strike by Steve Howard, a move set up by former City favourite Tony Thorpe.
Thorpe, who switched clubs in the summer, was roundly booed every time he had the ball.
"You expect a reaction like that when you go back to an old club," he said. "It's not nice but I shrugged it off and City are still my tip for promotion." City drew their best crowd this season of 14,057, after bringing down admission charges to counter Black Saturday, the Saturday before Christmas.
There was little to enthuse about them in a shapeless first half in which the best chances fell to City, but they failed to capitalise.
From one of MurrayÂ’s penetrating crosses Lee Peacock smacked the foot of Carl Emberson's right post, but City's lack of authority in the air was costly.
Late in the second half they hit the woodwork twice more, but it took the dismissal of Davis to give them their chance when Mickey Bell took a corner on the left with only seconds left.