The 25-year-old, who has been at the Red Devils since 2010, has failed to force his way into Richie Barker's plans and spent time on loan at Morecambe and Grimsby in the 2011/12 season.
Brodie will join his hometown club on a one-year deal on July 1 after his current contract at Broadfield Stadium expires.
"We are delighted to have brought Brodie back to the north east and his home town of Gateshead," said Heed chairman Graham Wood.
"He has a good record in the Conference and is a key signing for the club. Hopefully he will produce the form that saw him win the league's Golden Boot while at York."