Glen replaced Ivan Sproule for the final 18 minutes at Pittodrie and the move paid off when the former Hearts man found the net 10 minutes later.
The result leaves County behind Highland neighbours Inverness only on goal difference in what is fast becoming a fairytale season for Derek Adams' side.
Aberdeen created the better chances early on. After 25 minutes, Niall McGinn picked out Ryan Jack at the back post. His shot was disappointing, but the hard-working Johnny Hayes kept the play alive and forced Mark Brown to turn the ball behind.
When County did threaten, it was a lack of numbers in attack that was their undoing. Rocco Quinn sent Sproule scampering away down the right a couple of minutes later but with only Sam Morrow to aim at, his low cross was cut out by Russell Anderson.
After 33 minutes, McGinn was forced to come deep to create himself an opportunity but despite Brown's save, diving low to his right, the shot was always fading away from goal.
A couple of minutes later, the visitors earned a corner when Jamie Langfield was forced to dive to his left to turn away Sproule's low, right-footed shot.
Sproule had netted four goals in as many games since his move to Dingwall and he looked to be on course for a fifth when Quinn caught Josh Magennis in possession and sent the Northern Irishman clear through the middle, but he used a hand to control the pass and referee Crawford Allan was wise to his trick.
It was a surprise when the lively Sproule was hauled off to be replaced by Glen after 72 minutes, the former Hearts man joining fellow sub Steffen Wohlfarth in attack.
McGinn, as usual, was the main man in attack for the home side and when Langfield shunned the short pass in favour of route one with 15 minutes to go, the former Celtic man was the target.
He easily turned Scott Boyd but lashed his shot into the side-netting.
Aberdeen had replaced Hughes with Robert Milsom just after the hour, and they threw on teenage striker Declan McManus for Hayes for the final 12 minutes.
But it would be County's changes that paid off. Wohlfarth laid the ball into the path of Glen with nine minutes to go and the 22-year old lifted the ball high past Langfield to open the scoring.
Gavin Rae came close to levelling for the home side when he turned a Peter Pawlett pass towards goal, but Brown got down well to save at his near post.