Lapslie helped a rebound over the line from close range after Rhys Oates’ shot on the turn thumped the post and flew across goal in the final minute of stoppage time.
The dramatic victory lifted Stags two places up into eighth, a single point off the play-offs and four off the top three automatic spots but with three games in hand.
Stags boss Nigel Clough had made just the single alteration to his starting line-up following the late midweek win at Oldham’s neighbours Rochdale.
Jordan Bowery remained among the substitutes despite his dramatic winner at Rochdale, with Kieran Wallace the player stepping up to replace Ryan Stirk in the only change.
In glorious, warm sunshine at Boundary Park, Oates showed early intention for the Stags when he left defender Jordan Clarke floundering before firing in a shot which Danny Rogers saved well.
Oldham skipper Carl Piergianni headed straight at Nathan Bishop at the other end, before the hosts struck the opener in the 23rd minute.
Jack Stobbs crossed in superbly for Davis Keillor-Dunn, who guided a neat header past a flat-footed Bishop.
Buoyed by their impressive opener, Oldham almost added another when Keillor-Dunn this time smashed a 25-yard effort inches off target.
Bowery was introduced in place of Elliot Hewitt at the interval, but it was Oates who tested Rogers with a smart header soon after the restart.
Matty Longstaff was then denied by a brilliant point-blank stop from the Oldham keeper.
But Stags were level in the 53rd minute when Longstaff teed up Oates, who rifled clinically into the top corner via the slightest of deflections to even it up.
With the Stags now back in the ascendancy Bowery tested Rogers, as did Stephen Quinn with a curling shot from the edge of the box.
Oldham appeared to be crumbling, and Stags sub Lapslie headed a whisker wide.
Both sides went for broke at the end, but Clough’s men went on to notch a most memorable of wins thanks to Lapslie’s late, late intervention as struggling Oldham were sentenced to a sixth straight defeat.
OLDHAM: Rogers, Clarke, Piergianni, Sutton, Couto (Fage, 67), Adams (Hunt, 67), Whelan, Stobbs (Vaughan, 74), Bahamboula, Hope, Keillor-Dunn. SUBS NOT USED: Leutwiler, Da Silva, Diarra, Hopcutt.
STAGS: Bishop, Hewitt (Bowery, 46), O’Toole, Perch, McLaughlin, Longstaff (Lapslie, 80), Wallace (Stirk, 67), Quinn, Murphy, Oates, Hawkins. SUBS NOT USED: Stech, Rawson, Johnson, Akins.
REFEREE: Ben Toner.