Gallagher put the visitors 2-1 up with his second goal of the match before Fernandez sealed the win as Chelsea rallied to secure the points that took them up to 10th in the standings.
The result adds to the pressure on Palace boss Roy Hodgson, whose side have not kept a clean sheet in 13 league matches. They sit 15th on 24 points, five points above the drop zone.
It was a tale of two halves for Chelsea who went into the break a goal down after a superb Jefferson Lerma strike on the half-hourhad given the struggling hosts the lead.
“We saw two different sides. In the first half we were so flat and I was so disappointed. In the second half much better and I am very pleased with how we finished the game,” Chelsea manager Mauricio Pochettino told the BBC.
Gallagher’s first goal against the club where he had a spell on loan in 2021-22 came two minutes after the break as he neatly side-footed Malo Gusto‘s cross from the right high into the net.
Another Chelsea counter attack, and another Palmer assist, saw the visitors seal the points in the 94th through Fernandez.
The third goal “led to an aggravated defeat but I don’t think that’s a fair reflection on the way the game was played. I think we deserved to come off with at least one point,” said Hodgson.
Lerma had put Palace ahead with a spectacular strike from outside the box into the top right corner after Tyrick Mitchell won the ball from Noni Madueke as Chelsea tried to recover from a weak headed clearance by Thiago Silva.
Chelsea managed just one shot off target in the first half, despite commanding almost 80% of the possession.
The Blues were similarly dominant on the ball after the break but decidedly more attacking after a lacklustre opening period in which they posed little threat going forward.
Monday’s result follows Chelsea’s 3-1 victory at Aston Villa in their FA Cup forth round replay last Wednesday. It was also their 13th straight league win over Palace – a club record.