But that was only the start of the drama as James Collins' penalty 15 minutes later was ruled out when referee Andy Davies' assistant, Akil Howson, spotted a double touch by the Republic of Ireland striker.
Middlesbrough – who had a penalty from Marcus Tavernier ruled out against Norwich on November 21 for the same offence – also had midfielder Sam Morsy sent off in the penalty incident for handling Collins' initial strike.
Despite having to finish the game with 10 men and Luton desperate for a change in fortune, Middlesbrough withstood late pressure to seal the points, including a late save from Marcus Bettinelli to keep out Luke Berry's header.
Boro moved up to seventh and closed the gap on the play-off places by securing a second home win inside four days.
In a pretty tame night of football in which chances were few and far between at both ends, the Hatters could just as easily have edged ahead before the opening goal.
Middlesbrough, fresh from a convincing win over Millwall on Saturday having scored early, could not find that explosive start this time around as Luton played with greater initial confidence.
The Hatters, now without a win in five away from home, passed the ball around neatly and missed out on the opportunity to leapfrog Middlesbrough in mid-table.
There was a decent delivery that looked like it could cause a problem midway through the half when Rhys Norrington-Davies looked to pick out the unmarked Pelly Ruddock-Mpanzu in the area, but there was too much pace on the cross.
Middlesbrough's best chance came when full-back Anfernee Dijksteel was fed by Tavernier down the line. Dijksteel did his bit, but his well-struck cross was turned away by goalkeeper James Shea.
The Luton goalkeeper was not asked any other questions before half-time. Middlesbrough's only other noteworthy chance was when Dael Fry volleyed over the crossbar from 15 yards when his initial header had been blocked.
Within a few minutes of the restart there was renewed hope of a goal when George Saville arched his body to volley over the bar.
Middlesbrough took the lead with a well-worked goal after 52 minutes. Tavernier's run at pace towards the box led to him finding Marvin Johnson, whose low cross was turned in by Akpom from close range.
Fifteen minutes later, goalkeeper Bettinelli failed to hold Glen Rea's effort on goal and a penalty was awarded when Morsy handled to block Collins' rebound effort.
Collins, who also had a late header saved, found the net, but the referee's assistant agreed with Boro complaints that there was a double touch and it was ruled out.