Rhinos trailed 16-6 and 22-12, but scored three converted tries in the final 15 minutes to win 30-24.
McDermott admitted his team were “gassed” for much of the second half and he did not expect them to come back from two scores behind.
He said: “Coming here is difficult and we were playing a side who had a disappointing loss last week so they were really fired up.
“I said at half-time although it wasn’t a vintage performance up until then, that’s what it’s like here.
“I said you have to get used to being on the back foot and being near your own tryline whether you think you should be there or not and let’s see if we can dig one out.
“I’ve got to admit I didn’t think we’d come back when they pulled out more than two tries in front.”
McDermott felt the penalty count against his side early in the second half was costly, but hailed their never-say-die spirit.
“Across the board there was some real tenacity out there and some real grit,” he said.
“I thought Adam Cuthbertson was outstanding, he was hugely influential in the final 20 minutes, but Danny McGuire maintained calm and had a good control over most of it.”
The coach also praised second-rows Stevie Ward and Jamie Jones-Buchanan for playing the full 80 minutes.
He added: “We have got one or two things we need to improve on, but when you are on the back foot against a good Catalans team who know how to play here, it is no easy task.”