Preston 1 Barnsley 2: Late O'Connor strike secures Barnsley win
North End, who have won just twice on home soil this season, led through an early header from defender Craig Morgan.
But Tykes winger Adam Hammill's spectacular strike deservedly hauled the visitors level shortly before half-time and on-loan Birmingham striker O'Connor capitalised on a defensive error to settle the match in the 89th minute.
Advertisement
Hide AdAdvertisement
Hide AdPreston led in the fourth minute when winger Keith Treacy crossed in a free-kick from the right flank and Morgan headed home from six yards out.
But the visitors gradually gained a foothold on proceedings and, in the 16th minute, an outswinging corner from Hammill was met by Stephen Foster, who powered a firm header goalwards which drew a fine save from Preston goalkeeper Andy Lonergan.
The visitors deservedly drew level a minute before the break when Hammill collected possession 30 yards from goal and unleashed an unstoppable shot which flew into the top right-hand corner.
The visitors went close in the 63rd minute when Hammill's free-kick was met by Jason Shackell but his header from six yards flew over the crossbar.
Advertisement
Hide AdAdvertisement
Hide AdJust as the points looked set to be shared, O'Connor collected possession after a mistake from Sean St Ledger to fire home.
Preston: Lonergan, Jones (Gray 46), Morgan, St. Ledger, Davidson, James (Barton 57), Coutts, Parry, Russell, Treacy (Mayor 72), Parkin. Unused substitutes: Arestidou, Wayne Brown, Nicholson, McLaughlin.
Barnsley: Steele, Trippier, Shackell, Foster, Hassell, Hammill, Doyle, O'Brien, Lovre (Butterfield 89), Colace (Arismendi 74), Gray (O'Connor 74). Unused substitutes: Preece, Morales Neumann, Noble-Lazarus, Wood.
Referee: Oliver Langford (W Midlands)