The Bees leapfrogged the Robins to move up to third in the table after a stirring second-half fightback that never looked on the cards.
Goals from Sam Saunders and leading scorer Clayton Donaldson turned the game on its head after a first hour in which Rosler admitted his side were "outplayed by the best side in the league".
Swindon went ahead with half an hour played. Simon Ferry out-muscled Harlee Dean on the edge of the box to run on and hammer home a shot into the bottom corner of the net. They might have made it 2-0 shortly afterwards when Gary Roberts got on the end of an Alan McCormack knock down to fire against the upright.
The Robins controlled the game in every area of the pitch and the home side were booed off at the break.
Rosler said: "I thought that they wouldn't be able to keep that kind of tempo up for the whole 90 minutes. They were the best side we have seen this season and they outplayed us until the 70th minute.
"But to fight back the way we did and to see some players who hadn't had the best first half come out and put it behind them after half-time gave me huge pleasure. That could be one of the most important parts of our season."
Brentford rallied after the introduction of substitutes Saunders and Bradley Wright-Phillips.
Donaldson was hauled down in the box by goalkeeper Wes Foderingham and Saunders smashed his spot-kick down the middle to bring the Londoners level.
Then Donaldson, who had missed a gilt-edged first-half chance, was in the right place to run on to Wright-Phillips' ball forward and lash home at the near post from a tight angle.
- Sports & Recreation
- Clayton Donaldson
- Sam Saunders