Allen was dismissed by the League One club on Sunday night after a 2-0 defeat to Shrewsbury Town the previous day.
That result was enough to see the Gills slip down to 18th place in the table.
Taylor, 60, returns to the Priestfield Stadium on a temporary basis after helping the team gain promotion to the Championship during the 1999-00 season.
Chairman Paul Scally told the club's official website: "I am delighted that Peter has accepted this role and he will take responsibility for the team with immediate effect, meeting the management and players tomorrow morning, and taking charge of our game against Preston on Saturday and thereafter until a permanent appointment is made."
Taylor has been in charge of a number of teams, including Dover Athletic, England Under-21s and Bahrain, during his 27-year career in football management.