Former England winger John Salako netted his third goal in two games to snatch a dramatic victory for Reading over Gillingham.
The veteran midfielder, who scored twice in a 5-2 win over Burnley, struck with two minutes left as Reading's second-half charge paid off to send them up to fifth place and offer some daylight in the play-off zone.
Reading started brightly but saw their early hard work wiped out as Gillingham took the lead in the tenth minute.
The home side were fooled by a trick free-kick instrumented by player-boss Andy Hessenthaler. His ball into the box was headed home by Rod Wallace with the Reading defence appealing in vain for offside.
But Reading got back on level terms within three minutes when Luke Chadwick marked his debut with a goal.
The winger, on loan from Manchester United, needed the aid of a wicked deflection though, his left-foot shot looping over the stranded Jason Brown off the outstretched leg of defender Leon Johnson.
But Gillingham should have been back in front by the break as Reading enjoyed a couple of lucky escapes, keeper Marcus Hahnemann somehow flicking Mamady Sidibe's shot wide with his heel and then Nicholas Shorey heading a Chris Hope effort off the Reading line with Hahnemann beaten.
Reading's American keeper produced a fine save at full stretch to deny Roland Edge in the second half but Reading began to gain the upper hand and finally took control following the introduction of giant substitute Darius Henderson.
The big centre forward had an early impact as he was wrestled to the ground by Brown to hand Reading the chance of victory from the penalty spot.
But Steven Sidwell, a £250,000 signing from Arsenal, fluffed the chance of a third goal in as many games for Reading when his weak spot-kick was easily saved by Brown.
Further redemption for the keeper came five minutes from time when he superbly clawed away Nicky Forster's effort from a Henderson cross.
But the unlucky keeper was finally beaten by a second deflected goal two minutes from time.
Substitute Nathan Tyson's cross was flicked on by Forster and Salako acted quickest to hit a shot that flew out of Brown's reach via a David Perpetuini deflection.