The half-time substitute took full advantage of Wycombe's failure to clear their lines and unleashed a dipping left-footed volley from outside the box with eight minutes to go.
Gleeson's late strike snatched the momentum and advantage from Wycombe, who had looked on course to taking a valuable 1-0 lead into the second leg at Edgeley Park next weekend.
The home side had taken the lead eight minutes before the end of the first half when Delroy Facey took advantage of a calamitous clearance from County's John Ruddy.
The keeper's miscued kick ended up at the feet of Facey just outside the box and the on-loan striker shrugged off the challenges of three Stockport defenders to poke the ball past a despairing Ruddy.
The home side had the best of early exchanges and Wycombe midfielder Tommy Doherty was into the action after seven minutes as he stung the hands of Ruddy with a searing 25-yard strike.
Stockport offered little and their first chance came after 20 minutes when top-scorer Liam Dickinson muscled his way into the box only to smash the ball out of the ground and into the Wycombe countryside.
Dickinson had an eventful afternoon and the lanky striker made few friends at Adams Park with the repeated ease and frequency that he found the turf.
One particular piece of theatrics sparked a vocal exchange between the mangers as Wycombe boss Paul Lambert stormed to the Stockport bench to remonstrate with his opposite number Jim Gannon.
The tone set by the feuding managers translated onto the pitch and referee Darren Deadman had a busy afternoon issuing no fewer than six yellow yards.