The centre-back, 32, a summer signing from Bournemouth, has impressed during his short time at Priestfield and has been rewarded with an extra two-year deal which takes him until the summer of 2015.
"I'm absolutely delighted," Barrett told the club's official website. "I'm really enjoying my football. I came here on a one-year deal and we've had a good start.
"Personally I've really enjoyed it. The club have approached me, I want to commit my future to the club and I'm committed to the start of a project and where we want to go.
"I want to be a big part of that. I'm back close to my family. I'm very proud to play here and I'm delighted that's it all been agreed."
Chairman Paul Scally added: "It's a massive signing. We're absolutely delighted he is going to be part of the team for the next two years, this season plus another two, and let's hope that we can go to the Championship with him because that is where I think we can go and with players like Adam in the team, that's where we will go."