The Robins had been set to take a slender advantage into the second leg after Massimo Luongo’s strike had given the hosts the lead. But the hero turned villain when he brought down Harry Forrester in the box in the third minute of stoppage time, allowing Kevin O’Connor to sweep home from the spot.
A frantic opening period saw very few goalscoring opportunities created, as both sides struggled to settle and deal with the strong wind.
Despite Swindon edging the early exchanges, the first genuine chance of the match fell to Brentford’s Adam Forshaw, who was released through on goal by Clayton Donaldson, but dragged his shot wide of the target from 15 yards.
Adam Rooney was also presented with a golden opportunity in front of goal, but the Swindon striker saw his effort smothered by Simon Moore as he rushed off his line.
Rooney came close to finding the net just minutes later but couldn’t latch on to Gary Roberts’ expertly executed through ball, with the bounce taking it away from the on loan Birmingham attacker.
Swindon looked to play the ball on the ground more after the break and found the opener on 69 minutes, when Luongo placed a side-footed effort past Brentford keeper Moore.
The hosts saw two separate claims for a penalty turned down after O’Connor appeared to use his arm in the box and minutes later when Brentford substitute Farid El Alagui climbed on the back of Aden Flint to win a header.
Swindon continued to put the pressure on the Brentford goal and could’ve doubled their advantage when Rooney was once again played through on Moore. However, with the angle closing the keeper charged down the shot to keep it at 1-0.
As time ran down Brentford started to impose themselves on the game and came close to finding the net when El Alagui jinked through several challenges before being stopped by Alan McCormack, who put in a crunching tackle to the delight of the County Ground crowd.
But Luongo cancelled out his own good work from earlier in the match, sticking out a stray leg to bring down Forrest in the penalty area in the third minute of stoppage time.
Unlike last week, when Marcelo Trotta missed from the spot to send Brentford into the play-offs rather than the automatic promotion places, O’Connor made no mistake, coolly slotting home from 12 yards.