Mathias Pogba's second-half strike kept Blue Square Bet Premier leaders Wrexham four points clear at the top.
James Dance was lively early on for Luton, soon forcing Joslain Mayebi into making a good save.
Adrian Cieslewicz and Jake Speight had good chances for Wrexham, while Luton's Janos Kovacs should have scored from six yards but sent his header over.
Then, when the Luton defence misjudged Neil Ashton's long punt, Pogba stroked home his side's 73rd-minute winner.
It was the first really good chance of the night and Jamie Tolley was unlucky not to double the visitors' lead late on.
Wrexham's victory was the fifth in a row for caretaker manager Andy Morrell, but Luton drop to fifth after their first defeat in five games.
VIEW FROM THE DRESSING ROOM
Luton Town boss Gary Brabin told BBC Three Counties Radio:
"I told the players at half-time that a mistake would settle this game and that's how it proved to be.
"They came here with a gameplan to get people behind the ball and frustrate us.
"We need to win games ugly. Wrexham have taken that on board and it is working for them."
Wrexham caretaker manager Andy Morrell told BBC Radio Wales:
"It was a really tough game between two teams in good form and we've managed to nick it.
"Our lads are really buzzing. We knew it was going to be hard - I wouldn't say it was 100 miles an hour, it was probably 150!
"The lads dug in, defended really well and we'd said that it might take a long time to score. It might take a mistake or something to open it up and Pogs put it away lovely."