Championship side Boro went ahead early on through Lukas Jutkiewicz but Stanley clawed level before the break through Marcus Carver and snatched it late on with a strike by Piero Mingoai.
But Stanley had to survive an onslaught as Boro piled on the pressure and created a string of chances to win the game twice over.
And Beattie admitted his side put in a resolute display of defending. "They threw everything at us and we put in a magnificent performance. I'm proud of them," said Beattie.
"It was a fantastic reaction after the defeat at the weekend. We rode our luck at times, there's no denying that. They had a lot of chances and we did well. We put our bodies on the line. We showed commitment.
"There were some real heroic performances out there. I'm not going to single individuals out but they know who they are. I've told the lads to enjoy it but we start work on Wednesday on Saturday's game.
It was a massive win for the club, financially it could be a great boost for us, especially if we get a lucrative draw in the next round and it will give the lads another chance to showcase their skills."
A downbeat Tony Mowbray admitted it was his side's lack of cutting edge that cost Boro the game. "We have no excuses," he said. "We are out because we didn't take our opportunities and they took theirs.
"And there were plenty of opportunities. The bottom line is you have to stick your chances away and we didn't do that. You are only as good as your strikers.
"You can't have that much domination in a match and not score."
But he insisted his side would bounce back quickly from the humbling defeat. "They will feel the hurt of it like we all do but they are professional footballers and will quickly move on and focus on the next game," he added.