Boss Paul Driver was forced into a number of changes to the line-up that had taken the field in the previous five games with Ben Barnes and Brett Longden travelling with the first team to face Gateshead and Jemale McKenzie-Lowe falling ill just prior to the game.
In came development squad keeper Adam Whybrow to replace Barnes and Lee Hawkes and Arel Amu to replace Longden and McKenzie-Lowe respectively.
Town took the lead midway through the first half when a Charlie Smith free-kick was headed back across the box and bundled home by Amu.
Gillingham’s principle threat came from long throws and they equalised from one of these in the last few minutes as nudge on Whybrow went unpunished and the half ended 1-1.
Bedford's women cricketers make it three wins in a row
Clubs all set for big kick-off as Bedford Town, Ampthill Town and Real Bedford begin campaigns
Setchell feels Bedford Town deserved their opening point at Stratford
Industry gives way to housing
England World Cup call-ups for Bedford hockey masters
Despite losing Smith in the early stages of the second half, who was replaced by development squad midfielder Lucas Kirkpatrick, the Hatters were the dominant side for good parts of the remainder of the game and were unluckly not to take the lead when a quick counter-attack saw Jerome Jibodu break into the Gillingham half and cross for Zane Banton, but his shot was parried away by the visiting keeper.
Both Tinashe Chabata and Tuki Tayali, a replacement for Amu, had headers fly just over the bar from a corner before Luton their regained lead.
Ian Rees broke wide and his cross was perfect for Banton to despatch from 15 yards with just under 20 minutes to go.
Undeterred, Gillingham struck back within 10 minutes from a close-range header from a corner.
Hatters pushed hard for a winner in the closing stages and the three points needed to keep the pressure up on Leyton Orient at the top of the table.
Their best chance came to Banton but the visiting keeper pulled off an excellent save to deny him.
Driver added: “On one hand, given the changes to the team in vital areas, the late adjustments we had to make to our preparations and the general level of the performance, I am delighted with the players.
“On the other, we had the chances towards the end to get all of the points from the game and keep up maximum pressure on Orient.
“On the development side of things, Lee Hawkes and Tuki Tayali from the 16s had their best games for me which in encouraging going forward as is the fact that only Jerome Jibodu from the start line-up cannot play in the league next season”.
Hatters: Whybrow, Jibodu (C), Hawkes, Rees, Chabata, Jules, Trottmann, Smith (Kirkpatrick 54), Amu (Tayali 69), Banton, Maguraushe. Substitutes not used: Allman, Ngwala.