The hosts took the lead in the 49th minute with Sam Parkin’s fourth goal in six games, but Ian Westlake equalised within 30 seconds.
Glenn Murray then headed his sixth goal since his move from Rochdale in the 59th minute to consign the Hatters to the drop.
Brighton were better early on with Westlake twice firing into the side netting.
Michel Kuipers saved from Don Hutchison and Parkin before the latter missed the best chance of the half, heading Ed Asafu-Adjaye’s cross wide.
He made amends four minutes after the break, rounding Kuipers to score.
But then Dean Cox crossed for Westlake to head in off the bar, and another Cox cross set up the winner as Murray lost his marker to nod home.