Kevin Davies' penalty in addition to Stuart Beavon's fortuitous first-half opener put the hosts two goals to the good before James Tarkowski's late header for Latics ensured a frantic finish.
Beavon opened the scoring after he unknowingly deflected a Joel Byrom free-kick past the helpless visiting goalkeeper Mark Oxley to make it 1-0 to the hosts on 14 minutes.
Oldham ought to have levelled through Joseph Mills' 18-yard drive, before Tarkowski's header was saved by man of the match Declan Rudd and Adam Rooney's follow-up appeared to be handled on the line by David Buchanan.
Sidney Schmeltz again tested Rudd with a stinging drive, but Davies converted a penalty after being hauled down by James Wesolowski to put the hosts flatteringly 2-0 in front seven minutes before the interval.
After the break Scott Laird and Davies went close as Preston looked for a killer third.
However, Oldham still looked a threat going forward and Tarkowski's 83rd-minute header set up a nervy finish but Simon Grayson's side held on to take all three points.