Kevin, I did this a few years ago. I was staying in Levanto and took an early train out and made it to Milan and the airport in plenty of time. Sure, there's always some risk of a train delay, and I wouldn't cut it too close, but chances are, you'll be fine. I took the train fisrt to Milano Centrale and from there the train on to the airport. (I got a direct train from Levanto. I think major trains will stop in Riomaggiore too, otherwise you'll have to take a local train to Levanto or Monterosso or something. Some trains may change in Genoa.
Just go to the Trenitalia website and see what the train options are.
Always have a backup plan in case of a delay. What happens if you miss the flight? Do you have trip delay insurance? What would the cost of a flight the next day be - would that mess up the rest of your trip?