Substitute Alex Rhodes scored a 58th-minute winner to lift Brentford into second place in League One.
The winner was Rhodes' first goal in 15 months after a long injury lay-off
Rhodes tapped in at the far post after Michael Turner flicked on a corner to reward Brentford's dominance.
Injury-hit Yeovil fell behind when Isaiah Rankin turned in a Lloyd Owusu flick-on from inside the penalty area.
The Glovers levelled on 25 minutes when Terry Skiverton headed in and after Rhodes' goal, Arron Davies was twice denied by keeper Stuart Nelson.
Yeovil: Collis, Amankwaah (Guyett 29), Lockwood, Skiverton (Webb 85), Jones, Lindegaard, Terry, Cohen, Poole (Gall 74), Harrold, Davies.
Subs Not Used: Ramos, Miles.
Booked: Terry, Lockwood, Cohen.
Goals: Skiverton 26.
Brentford: Nelson, Brooker (Pratley 71), Sodje, Turner, Tillen, Hutchinson (Rhodes 45), Newman, Rankin, Tabb, Owusu, Gayle.
Subs Not Used: Bankole, Willock, Mousinho.
Booked: Tabb, Brooker, Rhodes.
Goals: Rankin 12, Rhodes 58.
Ref: L Probert (Gloucestershire).