The League One club announced on Sunday that Allen had been dismissed after a slow start to the season that saw them win just two of their opening 11 league fixtures.
Last term's League Two champions failed to win any of their first 10 matches in all competitions, but successive wins against Crewe Alexandra and MK Dons looked to have eased the pressure on Allen.
However, Saturday's 2-0 defeat at Shrewsbury Town proved the final straw for the Gillingham board, who have acted quickly to bring Taylor back to the Priestfield Stadium - where he managed in 1999-00 - on a temporary basis.
In a statement published on Gillingham's official website, chairman Paul Scally explained that the "huge response" from managers interested in taking the job means appointing a permanent successor will take "some considerable time".
"With that in mind, and based on my view that the playing staff require some immediate assistance to prepare for up and coming games, I contacted Peter Taylor to ascertain whether he would consider coming back to the club on an 'interim manager'," Scally added.
"I am delighted that Peter has accepted this role and he will take responsibility for the team with immediate effect, taking charge of our game against Preston on Saturday and thereafter until a permanent appointment is made."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.