The Bluebirds dominated proceedings but only held a 1-0 lead thanks to Ben Turner's 59th-minute strike as the game entered stoppage time.
A minimum of five additional minutes was signalled by the fourth official, but Stephen Foster earned relegation-threatened Barnsley a valuable 1-1 draw as his shot wrong-footed David Marshall in the 97th minute of the game.
The Cardiff supporters let their feelings be known in no uncertain terms when the final whistle went just moments later, but Mackay was satisfied with the explanation given to him by Graham after the final whistle.
He said: "I wanted the referee to clear that up, which he did. The extra time was for (Cardiff defender) Kevin McNaughton going down (for treatment).
"I was surprised it was five minutes at the end of the second half, but it was and I just wanted to clarify where the extra time came from, and the referee did that.
"When they scored there was four seconds to go, he was going to blow the whistle four seconds later and I am absolutely fine with that."