The 40-year-old, who originally joined the club in October 2009 as chief scout, was promoted to assistant manager at the start of the season, before he was appointed manager following the departure of Richard Money in March.
Brabin, who has had a spell in charge of Cambridge United, where he was named Conference Manager of the Year, led Hatters to the play-off final this season, where they were eventually beaten on penalties by AFC Wimbledon.
Town’s managing director Gary Sweet said: “We are very happy that Gary will continue in his role. We all know what the target is and Gary is now making plans for next seasons campaign.
“He will have the full support of the board in order to achieve the goal everyone wants and we wish him every success.
'Embarrassed' Hatter boss hits out at one of the 'worst' individual performances he has ever seen after Town's cup exit to Exiles
HATTERS RATED: Luton Town 2 Newport County 3
Jones warns 'naive' Town players they must be better if they want to feature for Luton following cup exit
Mendes Gomes left with a 'sour taste' after stunning Luton strike is spoiled by injury and cup defeat
Hatters humbled in the Carabao Cup as they let the lead slip twice against League Two Newport
“We all look forward to working with him over the next two years.”