With the score poised at 0-0 in yesterday's top-of-the-table clash with Brentford, Doncaster were on course to finish second behind already-promoted Bournemouth.
However, the Bees were awarded a penalty deep into added time that would have sent them up at Rovers' expense.
Marcello Trotta smashed the crossbar with his spot kick before Rovers streaked down the field and scored to not only snatch promotion but also first place in the league.
"So close, wasn't it? All credit to the lads," Flynn told BBC Radio Sheffield.
"It was a monumental effort. Thankfully it came right in the end."
James Coppinger tapped home the title-winning goal five minutes into injury time and Flynn was full of praise for the Donny player.
"You concede a penalty and you fear for the worst but thankfully it turned out brilliant," he said. "It's great for James Coppinger. I'm delighted.
"It's a beautiful game this and crazy at times. To come up as number one is what the chairman wanted and thankfully we've done it.
"We have to enjoy the moment and build on this for next season and I'm sure we will."
Brentford will now take on Swindon Town in the playoffs, with Yeovil Town and Sheffield United contesting the other semi-final.