The Gills looked to be slumping to their second defeat of the season when Luke Young put the hosts ahead with 11 minutes to go but Barrett headed in with two minutes remaining. Earlier, Curtis Nelson put Plymouth ahead but Ben Strevens equalised after 38 minutes.
Second-placed Port Vale could not capitalise after drawing 0-0 at Southend and are now level on 32 points with Cheltenham, who edged out Burton 1-0 thanks to a late Chris Zebroski goal.
A Nahki Wells brace enabled Bradford to move up to fourth with a 2-0 win at rock-bottom Aldershot while big-spending Fleetwood were twice pegged back in a 2-2 draw at Exeter.
Phil McNulty and Barry Nicholson gave the north-west side the lead on two occasions but the Grecians earned a point thanks to a Jamie Cureton effort and a John O'Flynn spot-kick.
Bobby Grant scored a deflected last-minute winner as Rochdale won 2-1 at struggling Wycombe. Ashley Grimes' early effort was cancelled out by Wanderers' Joel Grant but Rochdale snatched it when Bobby Grant netted in the closing seconds.
Torquay slipped out of the play-off spots after a 0-0 draw at Oxford and promotion hopefuls Rotherham were thrashed 5-0 at Dagenham and Redbridge. Dwight Gayle and Luke Howell both scored twice as Dagenham ran riot with Medy Elito also getting on the scoresheet.
Adebayo Akinfenwa scored his first Northampton hat-trick as the Cobblers came from behind to win 4-2 at Accrington. Stanley led 2-1 after George Miller and Rommy Boco cancelled out Akinfenwa's opener but Northampton substitute Jake Robinson levelled and burly striker Akinfenwa secured the points for the visitors with two late strikes.
Wimbledon moved away from the bottom two with a surprise 3-0 win at York. Byron Harrison and Stacy Long put the Dons in control and Jack Midson added a third from the spot.
Richard Brodie scored two penalties as Morecambe beat Barnet 4-1 while Tom Eaves netted an 80th-minute winner as Bristol Rovers beat Chesterfield 3-2 in a five-goal thriller.
- Sports & Recreation