The actor, who has already filmed his final scenes to air next month, confirmed the news on Twitter yesterday but hinted at a possible return.
Gary, who plays bisexual investment consultant Danny Pennant, said: "Thank you for your messages loved my time @EastEnders. Interesting character with lots of scope see u later rather than good bye ;-) ps more 2 come x."
Gary originally joined the soap in September 2012 playing a major part in the exit storyline for Syed Masood (played by Marc Elliott) and Christian Clarke (played by John Partridge).
Gary left after his short stint but returned in June 2013 as a regular cast member. Since, viewers have seen him embark on a relationship with Lucy Beale (played by Hetti Bywater) and flirt with newcomer Johnny Carter (played by Sam Strike).
Before joining EastEnders, Gary's acting credits included roles in Hollyoaks, Footballers' Wives and The Bill.
Gary recently competed in the last ever series of Dancing On Ice after being asked to come back for its 'All Stars' special, but the 32-year-old was voted out of the competition last week.
Are you sad to see Gary leave EastEnders? Tell us below, as the best comment from across the website each week wins £50!
Subscribe to Reveal Mag for Android & Apple devices just £2.49 for 4 issues! Check out how fab it is in the promo below!