The Rossoneri went behind to a Mark Bresciano opener at San Siro before Massimo Ambrosini and a stoppage-time Pippo Inzaghi header turned it around for a 2-1 victory.
"Palermo played well and did not deserve to lose," admitted Ancelotti. "Having said that, when we met earlier this season we deserved better and still lost, so that's football.
"Kaka got injured and Clarence Seedorf was rested, so we were missing two quality players. At the moment we aren't particularly sharp, but still achieved our main objective of fourth place."
Inzaghi also praised Palermo for their fighting spirit and smiled at his latest last-gasp heroics.
"I've been out for a while and had to rush back my recovery, but thankfully I am in good shape now. This is a wonderful night, as I had not played or scored much in Serie A recently.
"Palermo are a great side and made life difficult for us. They deserve to be higher up the table. It's nerve-wracking and we make our fans suffer, but it's fun to win this way!"