Luciano Becchio made sure in the 95th minute as he followed up the Republic of Ireland international's volley, although the home fans felt Leeds defender O'Dea should have seen red for a last-man foul minutes before.
Becchio was on hand to follow up a free-kick from Adam Clayton - who had put Leeds ahead for a second time on the afternoon.
Prior to O'Dea's late volley, another error from Leeds keeper Paul Rachubka appeared to have cost his side all three points.
Having gifted Coventry a late equaliser on Tuesday, the stopper was caught in no man's land as a ball sailed into his box and got tangled up with his defenders, allowing Mark Little to bundle in from six yards.
Before that, Andy Keogh's stunning opener had put Leeds ahead, only for Peterborough to level through Gabriel Zakuani and then be reduced to 10 men when Lee Tomlin scythed through the back of Keogh.
Peterborough were incensed by the decision but looked to have gained some reward for the afternoon when Little scored, only for O'Dea to then intervene, just seconds after he could have been dismissed for a last-man foul on David Ball.
Despite impressing since returning to the club on loan from Wolves, Keogh's return of one goal from nine games meant his place was under threat from last season's leading scorer Becchio.
But manager Simon Grayson's only change was enforced, with Mika Vayrynen replacing Robert Snodgrass, and Keogh justified his starting shirt immediately.
Taking in a pass from Clayton, he teed himself up just inside the area and thundered a volley beyond Paul Jones and into the top corner to give his side the perfect start.
Stunned by the setback, Peterborough searched for a response and Little was unlucky not to see anyone running onto his cross following a strong run down the right, while George Boyd drove over.
Ross McCormack then flashed wide from the edge of the area, before Peterborough, after a spell of pressure, levelled after 23 minutes when Rachubka did not come for a Grant McCann corner and Zakuani powered in a header from underneath the bar.
Leeds had the chance to regain the lead straight away but Keogh's finishing deserted him as he hit straight at Jones when clean through, but the Irish striker remained at the heart of the action and, with 37 minutes gone, was at the centre of the game's first flashpoint when Tomlin was dismissed.
Peterborough were already unhappy that Grayson would not allow his physio to treat Zakuani while the home doctor tended to Boyd and, tensions were raised further as Darren Ferguson furiously encouraged referee Keith Stroud to allow the latter to return to the field as play continued.
What was a temporary numerical disadvantage soon became permanent, though, as Tomlin clattered through Keogh with a challenge that perhaps looked worse than it was, but Stroud was convinced of its intent and wasted little time in issuing a red card.
The home side were incensed but their fury would have been worsened had McCormack and Jonny Howson taken the opportunities afforded to them either side of the break - the latter hitting a one-on-one at Jones and the former fizzing over from eight yards.
However, with the home side down a man and Leeds creating chances it only looked a matter of time before they took one, and so it proved with Clayton doing the damage in the 54th minute.
Substitute Lloyd Sam pulled Danny Pugh's cross down and rolled the ball across the area to the waiting midfielder who stepped inside the would-be tackle of McCann and stroked home his third of the season.
Peterborough then thought they had salvaged a point when Little slipped in to score, and McCann went close to winning it with a free-kick following O'Dea's foul on Ball, only for the defender then have the final say himself.