Rovers, who last triumphed against Blues in 1954, looked to be heading towards another defeat until substitute Cotterill rifled home an unstoppable 30-yard effort into the top corner in the 78th minute.
The point will certainly satisfy Doncaster more than Birmingham, who were on course for victory thanks to Lee Novak’s third goal since switching from Huddersfield over the summer, powering home unmarked from 10 yards just before the half-hour mark.
A draw was no real surprise considering the visitors went into the encounter having triumphed just once away from home in eight attempts this season while Blues had racked up just two league victories at St Andrew’s.
And so it proved as two struggling sides, who started the day separated by just one point and one place towards the wrong end of the Sky Bet Championship table, finished with a point apiece and both still to record back-to-back league wins this term.
There was very little to keep a crowd of just 12,663 excited about inside the opening quarter, with a definite lack of quality in final thirds at either end.
The first moment of excitement came from Novak’s attempted lob from fully 30 yards but Rovers goalkeeper Ross Turnbull was on hand to tip over.
Turnbull was at it again just minutes later as Blues forced a clear-cut opening, blocking well from Aaron Mclean after he had been put through from Jesse Lingard, with Mclean heading over from the resulting corner.
And the hosts’ purpose was rewarded in the 29th minute.
Dan Burn showed composure at the back, the ball was moved out to left-back Mitch Hancox and he sent over a deep cross which found Novak unmarked 10 yards out and he blasted past Turnbull.
Doncaster finally threatened through Mark Duffy, who forced Darren Randolph to tip over his strike, before the lively Novak rifled over prior to half-time.
With captain Richie Wellens replaced by Martin Woods at the break, Doncaster boss Paul Dickov then introduced Cotterill just before the hour mark in a bid to spark some life into his side.
And the visitors created a great opening just minutes later as Theo Robinson sent Federico Macheda clear but he was denied by the legs of Randolph.
The on-loan Manchester United frontman headed wide soon after as Rovers started to threaten.
And as the game entered the closing stages, Rovers got their reward as Cotterill rifled home into the top corner from distance.
Both sides pushed for a winner but it did not come, with the full-time whistle greeted by boos by the home faithful.