Despite dominating most of the match, it looked as if the Reds were going to slip to another loss after Hal Robson-Kanu fired Nigel Adkins' men in front early into the second half.
However, after missing a raft of chances, they finally came good in the 79th minute when O'Grady found the bottom corner from 18 yards - and he could have won the match soon after, only to miss his kick in front of goal.
It was by far their best performance of the season and, with just one win to their name, boss David Flitcroft will hope this result against a strong promotion candidate will kick-start their campaign.
Although Reading were outplayed, they could have so easily left Oakwell with three points as Adam Le Fondre went close and Alex Pearce rattled the woodwork.
Despite their poor start, Barnsley did not look a side bereft of confidence as they began far brighter than their visitors.
Jason Scotland had two efforts from good positions, the first he pulled wide and the second forced Alex McCarthy into a good save down to his left.
There was a definite sense that the Reds needed to score while they were on top and they came within inches after 15 minutes when Paddy McCourt flashed a dangerous ball across goal which just evaded O'Grady's studs.
Again they searched for an elusive opener as after defending a period of sustained Reading pressure, Jacob Mellis broke at pace and fed Scotland, who again drove an effort wide.
Somehow, owing to a shot from McCourt deflecting just wide in first-half injury time, Reading were able to get into the half-time interval on level terms, despite a first period of utter home dominance.
And what happened after the restart seemed all too inevitable as the Royals took a 51st-minute lead.
Le Fondre, a virtual spectator in the first half, had already wasted two glorious chances after breaking free down the left, but he was bailed out when Robson-Kanu sent a 20-yard effort flying into the bottom corner past Jack Butland.
To their credit Barnsley carried on in the same vein and were almost rewarded with an instant response but McCarthy palmed away McCourt's effort and then as Scotland was about to pounce on the rebound, a Royals defender nicked the ball away.
As Flitcroft's side pushed for a deserved leveller, Reading looked threatening on the break and Butland had to be at his best to deny Le Fondre's stinging effort, with Alex Pearce hitting the bar from the resulting corner.
But the hosts got their reward with 11 minutes left. They worked the ball across the face of goal to O'Grady, who composed himself and found the bottom corner.
There was only going to be one winner from then on and the Reds laid siege to Reading's goal, with O'Grady missing the chance to become an even bigger hero when he missed his kick in a great position.