The former West Ham man teed up Paul Anderson for the opener before grabbing two goals either side of Stephen McManus' header to end a nine-game winless run on home soil.
Posh, who had Lee Tomlin sent off early on, did draw level through Grant McCann and Dwight Gayle grabbed a late consolation but they were comfortably beaten by a City side who are now just three points from safety at the foot of the npower Championship.
City boss Derek McInnes made one change from the side that was set to face Watford on Boxing Day before the conditions saw the match postponed, with Anderson in for Liam Fontaine and he took just five minutes to make an impact, nodding home Baldock's ball from close range.
And the former MK Dons striker should really have added his name to the scoresheet shortly after but he put his effort wide when through on goal.
The visitors had lost all 14 matches when they had conceded first this season and their chances of ending that run took a real blow in the 12th minute when in-form striker Tomlin was sent off.
The Posh forward was given a straight red card when he seemed to elbow City left-back Greg Cunningham.
But just seven minutes later Darren Ferguson's men were level when Tom Heaton fouled George Boyd after a poor header back to his keeper from Cunningham.
McCann stepped up and squeezed his spot-kick beyond the former Cardiff keeper to draw the 10 men level.
Anderson, making just his second start of the season, could have been celebrating again in the 33rd minute but he failed to convert Albert Adomah's low cross.
And it was no surprise that it was Anderson and Baldock who combined to put their side back in the lead eight minutes before the break.
Baldock swapped passes with the former Liverpool winger before beating Bobby Olejnik for his first goal in open play for 16 games.
A minute before the break that man Baldock was at the heart of the action once more and the 23-year-old came inches away from grabbing his second of the match but his shot from six yards out crashed off the post.
The Robins, leading at the interval for the first time since October 20, looked to have put the game to bed just before the hour mark when McManus met Adomah's corner at the back post with a downward header.
Five minutes later the home side did made the points safe when Baldock sent Olejnik the wrong way to notch his ninth of the season from the penalty spot after Anderson was fouled by Michael Bostwick.
Gayle then grabbed a late consolation with his 13th of the season, sliding in from close range, but it was too little too late.