Top scorer Andrew Williams grabbed the decisive goal as the Glovers continued their impressive revival under manager Gary Johnson.
The visitors went in front after 10 minutes when Oldham midfielder Reece Brown lost possession and Gavin Williams cracked home a rising shot from 25 yards. Paul Huntington also went close for Yeovil.
Oldham should have levelled before half-time as James Tarkowski sent a six-yard header off target. But the equaliser came after 55 minutes, Filipe Morais sending in a corner which defender Zander Diamond headed in powerfully from eight yards out.
Shefki Kuqi wasted a golden chance to put the Latics ahead and his side were punished in the 65th minute when Andrew Williams collected Jon Obika's pass and rounded the goalkeeper before slotting home.
Tarkowski and Reuben Reid both missed by inches as Oldham pushed in vain for a late leveller.