Cinque Terre are close to La Spezia. From this port you have some small ferrys that stops a any port of Cinque Terre, starting by Portovnere which is very close to La Spezia.
La Spezia is from Livorno so far than Firenze. The best way is by car but I read in other forums that someone did it by train to La Spezia and then by Ferry. So, it must be posible to do it is you know well train and ferry schedules.