Chris Cohen's goal two minutes from time gave Yeovil their first ever league win over Brentford in an entertaining game at Griffin Park.
Yeovil stated brightly and had two early chances to take the lead through experienced striker Marcus Stewart.
Arron Davies' cross from the right on three minutes found Stewart unmarked on the edge of the six-yard box but he failed to keep his volley down and the ball flew over the bar.
Two minutes later Stewart beat the offside trap when he was played through by Terry Skiverton, but Brentford keeper Stuart Nelson was quickly off his line to save well with his legs.
Brentford's first chance came on 18 minutes when Jo Kuffour played the ball to Sam Tillen out wide on the left-hand side.
His cross was met by Calum Willock at the far post who headed back across for Clyde Wijnhard but he headed wide from three yards.
The Bees had another chance to take the lead five minutes later when Willock played in Thomas Pinault on the edge of the six-yard box.
The Frenchman lobbed keeper Steve Mildenhall but Terrell Forbes did well to clear off the line.
Mildenhall was called into action again on 25 minutes when John Mousinho crossed for an unmarked Willock whose downward header was well saved by the Glovers keeper.
On the stroke of half-time Yeovil hit the woodwork. Kevin Cooper's swerving shot from the edge of the area was parried by Nelson into the path of Davies but his shot rattled the crossbar.
Yeovil took the lead 10 minutes after the break. Skiverton did well to lose his marker to head home a Nathan Jones corner from five yards out.
Brentford had the chance to reply straight away when Pinault played in Kuffour on the left-hand side of the box but his shot was just wide of the far post.
Kuffour ended his six-game drought in front of goal when he latched on to a mis-hit shot by Gavin Tomlin on 80 minutes to fire home.
With it looking like the points were going to be shared, Cohen stepped up two minutes from the end to snatch the win for the visitors.
Stewart and Cohen played a one-two on the edge of the area before he fired home from eight yards.