Mauricio Pochettino's side were in complete control when Palmer scored his second goal to put the visitors three up with 20 minutes to play. Palmer had opened the scoring at Kenilworth Road before Noni Madueke doubled Chelsea's lead late in the first half.
But former Chelsea midfielder Ross Barkley netted to spark a spirited finish from third bottom Luton, who scored again through Elijah Adebayo in a dramatic finale.
Chelsea's second consecutive win was their first success away from home since a victory at Tottenham on November 6, ending a four-game losing streak on their travels.
If that was encouraging for Pochettino, the manner of their late bout of nerves suggested there is still much to work on for an inconsistent team languishing in 10th place.
Pochettino's first competitive win as Chelsea boss came in the reverse fixture against Luton back in August. But they have struggled badly since then and arrived at Luton hoping to avoid finishing 2023 with a 20th league defeat in the calendar year.
A self-described "football romantic", Pochettino admitted this week that he was relishing the opportunity to play against a club who just a few years ago were fighting to avoid extinction in the lower leagues.
But Pochettino also warned his young team they would get a taste of "real football" on their trip to ramshackle Kenilworth Road. Nestled amid tight rows of terraced houses, Luton's tiny stadium is the antithesis of the Premier League's glamour clubs.
Chelsea initially appeared quite at home in their gritty surroundings as they quickly seized the momentum. Palmer's early strike was held by Luton keeper Thomas Kaminski, but it was a statement of intent that presaged Chelsea's opener.
Luton were culpable as a poor clearance inside
Read on besoccer.com