The Bees midfielder headed Sam Saunders' far post cross home in time added on at the end to give new Griffin Park boss Mark Warburton a winning start to his managerial career.
A stalemate looked on the cards as both sides fought out a fiercely-contested midfield battle, with clear-cut chances few and far between.
The hosts' Will Grigg had the best chance of an even first half when he clipped Jake Bidwell's cross just wide, before Oldham danger man Mike Petrasso screwed an effort just past the far post before the break.
Saunders' goal-bound effort on the hour-mark was cleared off the line by Genseric Kusunga as the game went from end-to-end in the dying minutes.
Oldham left-back Ellis Plummer survived a clear-cut penalty shout when he sent Clayton Donaldson sprawling in the box with minutes to go, before Douglas escaped with a yellow card for a foul on the edge of the box as Oldham's Petrasso broke.
But Douglas had the last laugh as he rose highest at the far post to lift Brentford into third as the rest of the Sky Bet League One promotion pack dropped points.
- Sports & Recreation
- Sam Saunders