Leeds put up a defiant showing in Perpignan despite understandably having at least half an eye on next Saturday's Challenge Cup final.
Following Warrington's heavy loss to London, it looked as though both Wembley-bound sides would be heading to the capital on the back of heavy defeats when Leeds trailed 18-0 and 32-12.
But a stunning turnaround ensured the game was only won in the dying seconds, despite the home side having held a 20-point lead with 20 minutes remaining.
Catalan opened up an early 18-point lead with Setaimata Sa, Scott Dureau and Remi Casty all going over in the first quarter of the game.
Dureau converted all three efforts and added a penalty on 36 minutes after Leeds had held Eloi Pelissier down in the tackle.
That penalty sandwiched two Leeds efforts, Shaun Lunt going over after good work by Kallum Watkins, while the latter kept the Rhinos in the hunt, crossing 20 seconds before the half-time hooter after a big assist by Zak Hardaker.
Kevin Sinfield converted both tries to send the sides to the interval at 20-12.
After the break, the Catalans turned the screw in the stifling heat.
A smart break by Damien Blanch, supported by Clint Greenshields, gave the Dragons' field position before Sa's neat kick behind the Leeds defence was pounced on by Vincent Duport. Dureau converted to take the scores to 26-12.
Catalan captain Casty then scored his second of the night with a try to the left hand side of the posts. Dureau again converted to give the hosts a 20-point lead on the hour.
But Ryan Hall scored with 15 minutes to go and with the next set of possession, Leeds scored again through youngster Jimmy Keinhorst. Sinfield converted both to reduce the scores to 32-24.
With seven minutes remaining, Stevie Ward went on a jinking run across the front of the Catalan defence and sent the ball out to Hall, with the England winger picking the ball up and scoring in the same movement.
Sinfield missed the touch line conversion to see the scores narrowed to 32-28.
But Catalan won the game with a superb try. Blanch and Greenshields combined to give Scott Dureau the platform to put in a measured kick in behind the Leeds defence and Daryl Millard touched down.
Dureau sealed the win with his seventh goal from seven attempts.
There was just time for Leeds to hit back two minutes from time after Lunt's break but Catalan held on.