Trenitalia's own footnote gives the half-hour figure for Palermo Aeroporto to Palermo Notarbartolo — a station in the north of the city, not the centre. On the real timetable the run to Palermo Centrale takes 51 minutes to 1h09, most departures about 1h02. The bus does Centrale in about 50 minutes.
The maximum legal fare from the airport is €50, but drivers ask well above it: a passenger who should have paid €44 was quoted €65 and only paid the correct fare after arguing, and another was charged €70 for a trip to the university with traffic given as the reason.
The same single fare is €6.00 bought online or in the app and €6.50 from the driver. On top of that, the airport ticket office closes at 23:00, so a late landing means paying the higher price by default.
The airport sits at Punta Raisi, in the municipality of Cinisi, 35 km west of Palermo. There is no cheap urban-ticket hop here: even the bus is €6.50 and takes the better part of an hour, and the taxi is €39 at the very least.