Jacob Miller slotted over a late 50-metre drop goal at St James' Park to give Wakefield a 25-24 comeback win which denied Catalans the chance to move to the top of Super League.
The opening game of the second day of the 10th Magic Weekend brought together two in-form sides and it was Trinity who edged a thrilling contest to earn their ninth victory in 10 games in all competitions under Chris Chester.
It took 18 minutes for the first try to arrive through Justin Horo but that marked the start of a seven-minute purple patch for Catalans in which Jodie Broughton and Tony Gigot also crossed.
Wakefield, who dropped the Wildcats moniker for the event, got on the board before half-time through Ben Jones-Bishop and the winger made it a brace just after the interval to get Trinity right back in it.
Michael Sio's try edged Wakefield ahead for the first time but that only served to spark the Dragons back into life as Vincent Duport and Broughton both went over.
Catalans would have been further ahead but for three missed Pat Richards conversions and that proved crucial as Mickael Simon crashed over to level the scores.
Richards was off target again - this time from a penalty - and Miller kept his cool from the halfway line to give Wakefield their first win over Catalans in five attempts.
Wakefield have endured a miserable run at Magic Weekend since their last win in 2012 - losing heavily to Castleford on three occasions - but this Trinity side is a different proposition and they enjoyed a strong start against joint leaders Catalans.
Jones-Bishop went close to opening the scoring in the right corner after good hands and Wakefield passed a stern examination at the other end after conceding three straight penalties.
The momentum was now with Catalans, though, and their pressure told as Horo crashed over out wide on the right after taking Todd Carney's pass out the back.
The Dragons had another opportunity to attack Wakefield's line after Danny Kirmond caught Eloi Pelissier with a high tackle and they duly took it as Broughton touched down in the corner.
Richards was again off target with his conversion attempt but he made no mistake after Gigot beat hesitant Trinity defenders to Thomas Bosc's neat grubber kick.
Wakefield would have taken heart from West Yorkshire rivals Castleford's comeback from 14-0 down on Saturday and, like the Tigers, they got on the board with half-time approaching, Jones-Bishop scooping up a dropped ball from Duport and showing his speed on his way to the line.
The break came at a good time for Catalans with Trinity growing in confidence but Richards invited more pressure from Wakefield when he sent his restart too long.
Catalans survived that set but Jones-Bishop crossed for his second try minutes later after good work by Joe Arundel to draw in two Dragons defenders and supply the pass.
The Dragons were struggling to contain a Wakefield side full of energy and they fell behind for the first time when Sio powered his way over from Miller's crash ball.
Liam Finn made it three from three from the boot to make it 18-14 to Trinity but their lead was short-lived as Duport showed good strength to get the ball down out wide after Catalans had shifted the ball quickly from right to left.
Richards edged the Dragons back ahead and they had a six-point lead when Broughton took Carney's long pass and outmuscled Tom Johnstone to score his 15th try of the season in the corner.
Wakefield responded positively and were level eight minutes from time as Simon ran over the top of Bosc to score and Finn added the extras.
Richards hit a penalty against the post and Trinity went down the other end and won it through Miller's brilliant long-range drop goal.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: https://www.givemesport.com/writeforgms