Substitute Nick Chadwick teed up Luke Young who roofed in a thumping 20-yard strike to make it 2-1 with time running out but Gillingham levelled in the 89th minute when Barrett headed home from six yards after substitute Myles Weston headed back Jack Payne's cross from the right.
Argyle right-back Durrell Berry ensured the home side held on to a point when he cleared a goal-bound stoppage time shot from Adam Birchall.
Argyle surprised Gillingham by taking a 33th minute lead from Jamie Lowry's corner from the left. Warren Feeney's initial effort was scrambled off the goal-line but Argyle central defender Curtis Nelson was on hand to sweep the ball in at the far post.
Plymouth's lead was short-lived. Gillingham replied in the 38th minute when Ben Strevens latched on to Chris Whelpdale's miskick to level from 12 yards.