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."
Live Text Commentary
Full Time The referee blows for the end of the match.90:00 +0:41
The referee blows for offside against Mathias Pogba. Mark Tyler restarts play with the free kick.90:00 +0:07
Free kick awarded for an unfair challenge on Andrew Morrell by Curtis Osano. Direct free kick taken by Joslain Mayebi.89:37
Shot from inside the area by Mathias Pogba clears the bar.89:16
Jamie Tolley has a drilled shot. Mark Tyler makes a save.86:42 Substitution
Substitution Andrew Morrell is brought on as a substitute for Jake Speight.82:38
Robbie Willmott gives away a free kick for an unfair challenge on Nathaniel Knight-Percival. Joslain Mayebi takes the direct free kick.81:23
Inswinging corner taken from the right by-line by Dean Keates, save by Mark Tyler.80:16
Right-footed shot by Adrian Cieslewicz went harmlessly over the net.79:44
Jake Speight produces a right-footed shot from inside the area that goes over the bar.79:08
Foul by Robbie Willmott on Jay Harris, free kick awarded. Free kick taken by Joslain Mayebi.77:40
Indirect free kick taken by Joslain Mayebi.77:40 Substitution
Substitution Aaron O'Connor leaves the field to be replaced by John Kissock.77:40
Tommy Wright is flagged offside by the assistant referee.75:54 Booking
Booking James Dance is cautioned.75:44
Direct free kick taken by Joslain Mayebi.75:44 Booking
Booking Dean Keates shown a yellow card.74:47
Dean Keates fouled by Tommy Wright, the ref awards a free kick.72:41 Goal scored
Goal! - Mathias Pogba - Luton 0 - 1 Wrexham Mathias Pogba gets on the score sheet with a goal from just inside the area low into the middle of the goal. Luton 0-1 Wrexham.70:38
Tommy Wright challenges Nathaniel Knight-Percival unfairly and gives away a free kick. Direct free kick taken by Neil Ashton.
Adrian Cieslewicz gives away a free kick for an unfair challenge on Jake Howells. Robbie Willmott delivers the ball from the free kick right-footed from left wing.67:17
Shot from 18 yards by Jake Howells. Save by Joslain Mayebi.65:56 Substitution
Substitution Stuart Fleetwood leaves the field to be replaced by Tommy Wright.64:17
Jake Howells takes the inswinging corner, clearance made by Mark Creighton.63:03
Jake Howells challenges Dean Keates unfairly and gives away a free kick. Direct free kick taken by Dean Keates.59:21
Stuart Fleetwood challenges Nathaniel Knight-Percival unfairly and gives away a free kick. Joslain Mayebi takes the direct free kick.58:20
Corner taken by Jake Howells, Headed effort from deep inside the penalty area by Janos Kovacs goes harmlessly over the crossbar.53:49
Corner taken right-footed by Jamie Tolley, James Dance makes a clearance.53:04
Effort on goal by Keith Keane from 20 yards. Save made by Joslain Mayebi.51:39
Jake Speight is adjudged to have handled the ball. Direct free kick taken by Mark Tyler.50:52
Effort from 18 yards by Mathias Pogba. Save by Mark Tyler.48:52
Drilled right-footed shot by James Dance. Save by Joslain Mayebi.48:22
Handball by Jamie Tolley. Keith Keane takes the direct free kick.45:01
The referee gets the second half underway.45:00 +2:25 Half time
Half Time The match has reached half-time.43:50
Jamie Tolley produces a left-footed shot from just outside the box that goes wide right of the target.40:03
Free kick awarded for a foul by Robbie Willmott on Curtis Obeng. Jay Harris takes the direct free kick.37:57
The assistant referee flags for offside against Mathias Pogba. Mark Tyler takes the free kick.37:23
Joslain Mayebi takes the free kick.37:23 Booking
Booking Booking for Jake Howells for unsporting behaviour.37:08
Jake Howells challenges Jamie Tolley unfairly and gives away a free kick.35:48
Effort on goal by Stuart Fleetwood from deep inside the penalty area misses to the right of the goal.34:29
Corner taken left-footed by Jake Howells from the right by-line, save by Joslain Mayebi.33:23
Jamie Tolley concedes a free kick for a foul on Keith Keane. Keith Keane takes the free kick.31:22
Dean Keates takes a corner.29:45
Corner taken left-footed by Jake Howells from the right by-line, Shane Blackett has a headed effort at goal from deep inside the area missing to the left of the target.24:57
Free kick awarded for an unfair challenge on Neil Ashton by Aaron O'Connor. Joslain Mayebi takes the free kick.23:48
Stuart Fleetwood has a shot on goal from long range that goes wide left.21:00
Free kick awarded for a foul by Jamie Tolley on James Dance. Keith Keane takes the free kick.19:10
Mathias Pogba concedes a free kick for a foul on George Pilkington. Free kick taken by Mark Tyler.17:22
Jake Speight challenges James Dance unfairly and gives away a free kick. Mark Tyler restarts play with the free kick.16:45
Stuart Fleetwood is ruled offside. Joslain Mayebi restarts play with the free kick.13:43
The referee blows for offside against Stuart Fleetwood. Joslain Mayebi restarts play with the free kick.12:47
Curtis Obeng produces a right-footed shot from the edge of the area and misses to the left of the goal.10:37
Curtis Obeng challenges Robbie Willmott unfairly and gives away a free kick. The free kick is delivered right-footed by Robbie Willmott from left wing, Jamie Tolley makes a clearance.8:31
Stuart Fleetwood fouled by Jay Harris, the ref awards a free kick. Jake Howells takes the direct free kick.7:12
The assistant referee signals for offside against Stuart Fleetwood. Joslain Mayebi restarts play with the free kick.6:36
Unfair challenge on Janos Kovacs by Mathias Pogba results in a free kick. Mark Tyler restarts play with the free kick.5:23
Unfair challenge on Adrian Cieslewicz by Keith Keane results in a free kick. Direct free kick taken by Curtis Obeng.4:52
James Dance takes the chance to get an effort at goal. Joslain Mayebi makes a save.2:38
Unfair challenge on Stuart Fleetwood by Nathaniel Knight-Percival results in a free kick. Keith Keane takes the direct free kick.1:00
Free kick awarded for a foul by Keith Keane on Jake Speight. Neil Ashton restarts play with the free kick.0:00
The match gets underway.
Live data and text provided by our data suppliers