The visitors had survived an early scare when Dan Gray appeared to clothes-line Cheltenham striker Wesley Thomas as the hosts looked to break, but the referee failed to award even a free-kick.
Cheltenham offered little in response and it was a comfortable second-half for the visitors who could have added a second on two occasions.
Two minutes into the second period, Macclesfield's Nat Brown saw a header headed off the line by Brian Smikle, and Barnett almost capped an impressive performance with a diving header five minutes from time which forced an acrobatic one-handed save from Cheltenham keeper Scott Brown.
The closest Cheltenham came to scoring was when substitute JJ Melligan's deep cross in the 90th minute almost caught out visiting keeper Jose Veiga, who palmed the ball around the top-left corner.
Veiga had stood up to block well from Josh Low just before the interval but otherwise had a comfortable afternoon.
Source: PA
Source: PA