In a see-saw encounter, both teams scored two tries apiece but it was the home side who progressed to the next round with a narrow 17-13 victory.
Despite the eventual result, it was the Ravens who started the tie the livelier of the two sides with No. 8 Scott Hicks and his back row partner Andrew Waite testing the resolve of the hosts. Bargoed stood firm in the face of this pressure but were unable to prevent Lewis Williams kicking the visitors into the lead.
The pressure from Bridgend continued as Glen Holloway and Williams began to peg back the Championship outfit. Crucially though, they missed a number of glaring opportunities to spread the ball wide and Bargoed took full advantage.
With their forward pack to the fore, hooker Lee Meads crashed over from short range to the delight of the partisan home crowd. The conversion was added by the impressive Josh Prosser.
And after Williams missed another penalty effort, it got better for the home side as their dominance at scrum time led to a penalty try as the pack drove rapidly towards the try line. Prosser again added the extras to give Bargoed control of the tie.
At 14-3 down at the start of the second half, the visitors needed an improved performance to get back into the game.
Backed by a fantastic travelling contingent, the Ravens played their way back into the contest with some sensible territorial kicking. And they got their reward when Hicks crashed over though Williams put the conversion wide of the uprights.
The try seemed to rejuvenate the visitors and they began to play with intelligence and flair. This saw a lovely backs move finished off by winger Rhys Ward-Jones. Again, Williams put the conversion wide but it seemed only a matter of time before the Ravens got on top.
Bargoed deserve the utmost credit for the way they responded. The Championship outfit held out well in the face of adversity, forcing errors from their Premiership visitors.
And on a rare flurry into the oppositions half, they earned a penalty which Prosser slotted to secure the upset.