Sunderland took the lead inside four minutes when debutant Ellis Simms, on loan from Everton, opened the scoring.
The hosts drew level six minutes later through Andi Weimann, before Chris Martin put the Robins ahead.
Simms then added a second, allowing Ross Stewart to head home the winner 18 minutes from time.
Sunderland will now prepare for this week’s trip to Hillsborough to face Sheffield Wednesday in the Carabao Cup, with the Black Cats set to face QPR in their next Championship fixture at the Stadium of Light on Saturday afternoon.
Here, we take a look at Sunderland’s predicted final position and points total courtesy of data experts FiveThirtyEight:
Simms then added a second, allowing Ross Stewart to head home the winner 18 minutes from time.