Craig Reid and Luke Freeman's second-half strikes earned Stevenage a 2-1 win and made Brentford pay for two penalty misses.
The Bees could have scored from the spot either side of half-time but Clayton Donaldson fired against the crossbar and Sam Saunders struck a post.
It proved costly as Reid and Freeman netted in the space of nine minutes to propel Boro up to sixth spot and into the League One play-off places despite Saunders grabbing a consolation goal late on.
Brentford's best chance of the first half fell to Donaldson in the 32nd minute after Jamaal Lascelles hauled down Clinton Morrison - but the Bees striker rattled the woodwork. Donaldson then created a penalty himself four minutes after the break. Jon Ashton the culprit this time but Saunders could only strike the frame of the goal once more.
Inevitably they were made to pay as Reid swivelled smartly and slotted home in the 52nd minute and then Freeman rifled in a stunning 25-yard drive in the 61st minute.
Saunders struck a fine free-kick in the 90th minute but it counted for nothing as Stevenage moved into the final play-off place, with a two-point cushion with two games to go.