The last daily train North to Lisbon and direction Coimbra leaves Faro Station at 18:58.
You would be better to spend the night in Faro and the next morning catch the 06:55 from Faro which gets to Coimbra at 11:34.
You would need need to get a taxi from Faro Airport to Faro Station. About a 10 minute drive.