The visitors took a 50th minute lead when half-time sub Neeskens Kebano crossed from the left and Harry Wilson nodded across goal for Aleksandar Mitrovic to head in from close range.
But City refused to buckle and Palmer volleyed home from a narrow angle in the 79th minute after Fulham goalkeeper Paulo Gazzaniga had done brilliantly to palm out Chris Martin's shot.
The result extended City's run without a home win to 15 games, but they took much credit from a committed performance against superior opponents.
Fulham, backed by a large contingent of travelling fans, made a strong start, with crosses that created several half-chances.
Bobby Decordova-Reid had a 23rd-minute shot blocked before Nahki Wells miskicked six yards out at the other end.
Both goalkeepers were brought into action as the interval approached, Gazzaniga saving low from Martin and City's Dan Bentley diving to stop a similar effort from Josh Onomah.
Marco Silva made two changes at the break, sending on Kebano and Harrison Reed for Nathaniel Chalobah, who had been booked, and Onomah.
The decision paid quick dividends with Kebano setting up the opening goal.
Wilson was getting too much space on Fulham's right and almost doubled their advantage when beating Bentley only to see his effort role agonisingly wide.
City boss Nigel Pearson responded by sending on Nathan Baker for Cameron Pring and moving Jay Dasilva forward to left wing-back, also replacing Tyreeq Bakinson with Joe Williams after 64 minutes.
It did not stop Wilson getting in behind the defence again in the 69th minute, only to dwell on his shot and allow Baker the chance to make a recovery tackle.
Wells and Baker headed inches over, Dasilva had a shot blocked and Williams fired wide from distance as City tried to stage a late rally.
But Fulham remained a threat and Bentley had to spread himself to save at the feet of Kebano.
Gazzaniga made two outstanding saves to deny Wells and Martin, but the second saw the ball drop for Palmer, who had replaced full-back George Tanner, to find the net.
Both sides had chances in a thrilling finale, Fulham being denied by the crossbar when Jean Michael Seri's shot was deflected and Mitrovic twice shooting narrowly wide before also clipping the woodwork at the death.