The visitors were in total control of the first period with Gylfi Sigurdsson and Simon Church strikes giving Brendan Rodgers' men a two-goal cushion at the interval.
It was a different story in the second period, though, as Posh began quickly and it took just 10 minutes for them to wipe out their deficit with Craig Mackail-Smith and Aaron McLean grabbing the goals.
The hosts dominated the rest of the game and just as it looked as if a draw was on the cards, George Boyd produced a fine finish from close range in the 90th minute to give his side an unlikely three points.
The victory sees Peterborough climb above the Royals in the table and up to 18th, while the Royals slip to fourth from bottom.
Reading, who have played significantly better on the road than at home this season, started brightly and midfielder Marek Matejovsky caused Peterborough some early problems.
The Australian was at the heart of everything that the Royals were doing and he created opportunities for Sigurdsson and Church, while he also fired over himself.
The visitors were rewarded for their pressure and took the lead on the half-hour mark in fine style. Sigurdsson was pulled down by Paul Coutts just outside the area and the Icelandic midfielder stepped up and curled the free-kick over the wall and into the bottom corner.
Mackail-Smith flashed a header just wide for Posh soon after, but the Royals went straight up to the other end and extended their lead in the 42nd minute.
Sigurdsson sent in an inviting free-kick from the left and Church rose highest to power home the header and claim his first goal of the season.
Peterborough came out after the interval at lightning pace and made inroads into their deficit after just three minutes.
After a cleared corner fell to Tom Williams on the left, he curled in a cross which Mackail-Smith glanced past Adam Federici to register his third of the season.
McLean and Lee Frecklington both had efforts saved by Federici as Peterborough searched for a quickfire leveller, but they did not have long to wait as just nine minutes into the half their comeback was complete.
Boyd set McLean through on goal and the powerful striker closed in on Federici and fired home from the edge of the area.
Posh were desperate to claim the first win of their league campaign and Mackail-Smith had an effort crash against the bar, while Williams and McLean also went close.
Then, as the game entered its final throes, Boyd popped up with a cheeky back heel to steal the points and complete a fine comeback.