Brentford were 2-0 up after only 14 minutes before Jimmy Davis on loan from Manchester United scored his first goal for Swindon on 17 minutes.
Swindon had many chances throughout the game, but couldn't score again.
Eric Sabin was lucky not to get himself sent off after a late challenge.
Brentford ended Swindon's chances of getting back into the game by adding another goal late on.
Swindon now face three home games in a row against Stockport, Port Vale and the Worthington Cup game against Wycombe.