Rapid had the upper hand for the majority of the game and led 2-1 with 13 minutes to go before the game was turned on its head.
Tarik Elyounoussi equalised on 77 minutes and just three minutes later Prica scored the winner as Rosenborg claimed their first points in the competition.
Both sides had just pride to play for coming into the game with Bayer Leverkusen and Metalist Kharkiv out of sight, but both played their part in an attacking game.
Deni Alar had the first real attempt on goal, his 20-yard shot from the left fumbled by Rosenborg goalkeeper Alexander Lund Hansen.
It heralded a period of attacking intent from the Austrian side as Alar and Christoper Trimmel both fired in shots, Terrence Boyd put the ball wide from close range and Cristian Gamboa shot over the bar.
Rosenborg had shown nothing as an attacking entity but they took the lead against the run of play in the 28th minute, John Chibuike shooting into the bottom right-hand corner.
Michael Schimpelsberger fired over for Rapid but it was Rosenborg who came closest to adding to the score, Rapid goalkeeper Jan Novota forced to parry Borek Dockal's free-kick.
Rapid started the second half much as they had spent the previous 45 minutes, on the attack.
Boyd's shot was blocked by Tore Reginiussen but finally the visitors levelled, nine minutes after the break.
Christopher Drazan supplied the cross which found Thomas Schrammel in the centre of the penalty area and the defender made no mistake, firing a right-footed shot into the top right of the goal.
Drazan then took a chance himself, his 25-yard shot comfortably saved by Lund Hansen.
However, just moments later and Drazan was instrumental in restoring Rapid's lead, his shot parried by the keeper with Boyd on hand to slot home the rebound.
Schrammel fired wide as Rapid kept up the pressure but it was Rosenborg who turned the game on its head with two goals in three minutes.
The first saw them level the game at 2-2, Tore Reginiussen's pass from the left of the area finding Elyounoussi in the centre who slotted home a low shot.
The Norwegians almost went ahead moments later with Novota forced to save Elyounoussi's shot with his feet.
However, they made no mistake moments after when Prica converted Jonas Svensson's pass from the left of the area.