The former Barnet boss has signed a two-year deal at Priestfield.
Gillingham were searching for a new manager after Andy Hessenthaler moved into a director of football role at the end of last season.
They have chosen Allen, who left Barnet after helping the club avoid relegation from League Two on the final day of last season.
Chairman Paul Scally said: "There were never any first choices, but he was the first person we offered the job to.
"It's been very busy since the end of the season, I have worked long hours, weekends, Bank Holidays.
"People have been on holiday around the world and it's taken time. We have been patient. I think I've probably met with him at least four times through the process. But we wanted to get it right.
"You always think you've got the right man, and hopefully we have done that."