Jermaine Beckford opened the scoring against his old club from Jonny Howson's cross, before Bradley Johnson saw his deflected shot make it 2-0.
But Gary Hooper capitalised on some poor defending to pull one back, before he ran through unchallenged to level - yet Beckford hammered in from 12 yards to win it before Leeds had Howson sent off for two bookable offences.
Grayson said: "Scunthorpe showed what a good team they are, coming back from two down to equalise before Jermaine's winner.
"We gave them a big lifeline by conceding a bad goal just before half-time when two players went for the same ball, but we showed great team spirit to grind out the win after having a two-goal lead taken away.
"Jermaine will get the credit for his two goals. Individuals can win games but it is more about collective effort and the players really dug in to get the right result."