The visitors almost went ahead after just four minutes when Taylor's right-footed shot from the edge of the box was saved.
Marcus Maddison then threatened to open the scoring for Peterborough as his left-footed strike whistled narrowly wide.
McDonald put the hosts ahead after connecting with Jake Hessenthaler's cross with a bullet header on 26 minutes.
Gillingham could have doubled through McDonald but his shot from 25 yards was put just wide.
Taylor rocketed a right-footed strike into the top-right corner moments before half time to level the scoring.