Charles boosted Stevenage's survival hopes with a timely double either side of a Cody McDonald effort for Gillingham after Francois Zoko broke the deadlock for the hosts with a 22nd-minute penalty.
Victory over Gillingham – who had Elliott Hewitt sent off in the first half – means Stevenage have now claimed six points from the last nine available to close the gap on nearest rivals Sheffield United to just a point and leaves Graham Westley's men just two points from safety.
Fellow strugglers Bristol City lost 2-1 at home to Coventry City to give Stevenage supporters more reasons to cheer on Tuesday.
The visitors raced into a two-goal lead inside 25 minutes through Franck Moussa's 12th of the League One campaign and Andy Webster's first since November.
Wes Burns pulled an 82nd-minute goal back for Bristol City, but it was too little, too late.
In League Two, Bury held high-flying Oxford United to a 1-1 draw at Gigg Lane.
Craig Jones put the home side ahead with his first league goal of the season after 56 minutes, but Oxford – who passed on the chance to go second – equalised just two minutes later as Josh Ruffles opened his account for the club.