Braintree boss Danny Cowley knows 25-year-old Gardner well from his time in charge of National League South side Concord Rangers.
Gardner has left the Beachboys last month after saying he had “lost his appetite for the game”.
Gardner re-joined Concord from Maldon & Tiptree in 2014 and had a superb 2014/15 season, helping the Beachboys to the FA Cup First Round and retain the Essex Senior Cup.
The midfielder, who has been a key player in recent seasons, and made the decision over the New Year after struggling to nail down a permanent starting spot in the team this campaign.
But the chance to re-unite with Cowley and step up to the National League was too good a chance to pass by.
The Iron have also signed goalkeeper Harry Palmer.
The 20-year-old has gained plenty of experience in non-League football, having taken in spells with Hertford Town, Hillingdon Borough, Witham Town, Holmer Green, Maldon & Tiptree, Ware, Waltham Abbey and Heybridge Swifts.