Daniel Bogdanovic gave Barnsley a 57th-minute lead at the Madejski Stadium but with a minute to go, Tykes defender Rob Kozluk attempted to head the ball back to Luke Steele only to see it go past his own goalkeeper and into the net.
Extra-time seemed likely but when Reading skipper Alex Pearce tangled with Kayode Odejayi in injury time referee Graham Horwood pointed to the penalty spot and Bogdanovic scored the goal that put Barnsley through.
"There was no doubt in my mind who was going to take the penalty," said Davey.
"He had to fly back to Malta this week to see his mother who was having an operation after a heart attack. He had to sign the forms for it to happen.
"When he came back, we assessed his frame of mind but he was keen to play so we let him.
"It's an important win because it ends that run of three defeats. When that equaliser went in I thought 'here we go, that's Simon Davey's luck again' but that game was all about the mad, mad world of football.
"Hugo Colace came back into the group after injury and did well and Luke Potter at centre-back was magnificent. Our goalkeeper Luke Steele was also excellent.
"We meet Reading again in the Championship on Saturday but both sides will make changes and tonight may not have a great deal of bearing on the result of that game."