An injury to goalkeeper Stephen Henderson after all three substitutes had been made meant Pompey forward Kal Naismith finished the match between the sticks, with Christian Burgess sent off in stoppage time.
The visitors had got off to a lightning start and took the lead after just four minutes when captain James Coppinger drilled his effort past Henderson, who returned to the club on loan from Nottingham Forest on deadline day.
However, Pompey then started to dominate the match and levelled through debutant Anton Walkes in the 19th minute after he snuck in at the back post from Gareth Evans' corner.
The home side should have taken the lead just before the half-hour mark when defender Matt Clarke had his header saved by the fingertips of Doncaster goalkeeper Ian Lawlor.
And despite all of the home side's dominance, Doncaster took the lead for the second time in the 63rd minute after John Marquis headed in from Coppinger's corner.
Pompey continued to battle their way back into the match and were rewarded when substitute Pitman prodded home to bag his 14th goal of the season in the 81st minute, before hanging on as their numbers diminished in the closing stages.
“It was a strange sort of game,” he said. “Any time you come to Portsmouth, it’s always tough. There’s no two ways about it.
“If you can manage to come away without getting beat, you’re always thinking it’s not a bad result.
“The way the game went, the first 20 minutes we were absolutely outstanding.
“It was fantastic the way we passed the ball and moved it. Copps got the early goal and we were totally dominant.
“But from a set piece one of my players loses his man and that changed the game.
“After that we couldn’t get a foothold in the game, I’ve got to be honest.”