The former England international joined the club in 2019, becoming a first-team regular and going on to make 47 appearances across two seasons.
He wished the club and the supporters well on Twitter: “I have really enjoyed my time at the club, and I want to extend my sincere thanks to everyone involved at the club, especially the fans and the staff who welcomed me into their south London family.
“It’s been a privilege to play at Selhurst Park, especially in that first season where I got to experience the atmosphere that the Eagles fans create on a matchday.
“Playing in front of the Holmesdale Road stand is a memory that I will cherish in particular. I would like to wish the club all the best for the future and wish them every success for the upcoming season.”
Everyone at Crystal Palace thanks Gary for his service to the club over the past two years, and wishes him all the best for the future.