Wing Jonny May's late try gave Gloucester a dramatic 27-22 victory as Perpignan had their former Munster centre Lifeimi Mafi sent off.
- Related Content
May struck five minutes from time during an intense Pool Six encounter, while scrum-half Jimmy Cowan also scored and his half-back partner Billy Twelvetrees kicked 17 points.
It was rough justice on Perpignan's Wales international full-back James Hook, who scored an early try, converted it, kicked a drop-goal and booted four penalties, but Perpignan are left still seeking a first Heineken victory on English soil.
For Gloucester, though, it lifted the early-season gloom surrounding a poor start to their Aviva Premiership campaign, and they will now visit Munster next Saturday after giving themselves a timely injection of confidence.
Perpignan led for most of the contest, but their night unravelled during the closing stages.
May firstly had a try disallowed following a Mike Tindall forward pass, but he did not waste his second opportunity shortly afterwards, while Tonga international Mafi was dismissed by Welsh referee Leighton Hodges for a tip-tackle on Gloucester centre Ryan Mills.
Gloucester were forced into a key late change when illness sidelined their England international fly-half and principal goalkicker Freddie Burns. Twelvetrees wore the number 10 shirt in Burns' absence, with Mills called up as Tindall's midfield partner.
Perpignan, meanwhile, fielded former Gloucester back-row forwards Luke Narraway and Alasdair Strokosch, while Hook continued in the full-back role he has filled for most of this season.
And it took the Wales international just 57 seconds to make his mark as Perpignan stunned their hosts by scoring a try that was clinically executed.
Fly-half Camille Lopez kicked behind the Gloucester defence and Perpignan wing Wandile Mjekevu gathered possession brilliantly before off-loading with one hand and Hook crossed wide out.
Hook then converted from the touchline, putting Perpignan seven points clear and leaving Gloucester reeling less than a week after they were humbled at home by Premiership rivals Exeter.
Gloucester could hardly get their hands on possession during the opening 10 minutes, and it took a couple of Perpignan handling errors before they threatened their opponents' 22 - but two Twelvetrees penalties during a seven-minute spell cut the deficit.
Hook then kicked a 45-metre penalty to make it 10-6 before Gloucester suffered a front-row injury blow when tighthead prop Shaun Knight went off and was replaced by Dan Murphy.
Gloucester hustled and bustled in the close-quarter exchanges, but apart from an occasional glimpse of James Simpson-Daniel magic they lacked composure to threaten Perpignan's defence until just before half-time.
Lock James Hudson smashed through Perpignan's defence in midfield, and Gloucester rifled possession wide to May, but he was held up just inches short by a stunning Hook tackle, which preserved his team's seven-point advantage.
Gloucester had another opportunity in injury-time when Cowan muscled his way to within touching distance of Perpignan's line, only for his opposite number Nicolas Durand to halt his progress.
Twelvetrees had an opportunity to complete his penalty hat-trick, though, and he delivered the goods as Gloucester trooped off 13-9 adrift, still firmly in contention.
Perpignan's second period opening proved in stark contrast to that of the first half, as Durand collected a yellow card for deliberate offside and then Gloucester made them pay immediately.
Durand had barely left the pitch before Cowan took a quick tap penalty and dived between two Perpignan defenders for an opportunist 45th-minute try that Twelvetrees converted.
The game's ebb and flow continued at pace, and Gloucester's lead lasted barely 10 minutes as two more Hook penalties edged Perpignan 19-16 ahead, his second strike coming after home flanker and England international Matt Kvesic was sin-binned for an offence at the breakdown.
Hook continued his masterclass by booting a 63rd-minute drop-goal, only for another Twelvetrees penalty to keep Gloucester in the hunt and set up an enthralling finale that saw May strike gold and Mafi see red.