First half goals from Ryan Blair and Daniel James ensured it was the Welsh outfit that progressed through to the quarter-finals.
It was a young Rovers side that took to the field at Swansea's Landore Training Ground, with just Adam Henley, continuing his return from injury, offering any meaningful first team experience.
In contrast the home side were older and that told as they started strongly, taking the lead inside nine minutes when James crossed for Blair to head home.
But Rovers responded well, Joe Rankin-Costello forcing a save from Gregor Zabret, before Lewis Mansell saw an effort cleared off the line.
The visitors continue to threaten with Charley Doyle and Willem Tomlinson both going close, but it was Swansea who extended their advantage on the stroke of half-time when James finished well.
Andy Fisher in the Rovers goal made key saves at the start of the second half as the Swans looked to turn the screw, but again it was Damien Johnson's side who grew with confidence.
And they very nearly reduced the deficit when Mansell rattled the crossbar, before Daniel Butterworth was denied by Zabret.
The home side pushed in the closing stages, Fisher with an outstanding save to deny Mael Davies.
"They were just a little bit older and little bit more experienced than us," said Johnson.
"We were disappointed with the goals that we gave away, they were poor times to concede, but we responded well and if one of our chances had gone in then it would have been a different game.
"But there were positives to take from the performance, it was a tough test, we will learn from it."
ROVERS: Fisher, Henley (sub Thompson 60 mins), C. Doyle (sub Hendry 82 mins), Magloire, Travis, Rankin-Costello, Hardcastle, Mols (sub Grayson 73 mins), Tomlinson, Butterworth, Mansell.
Subs not used: Powell.