The first GO Train is at that time, but there's
GO Buses to Niagara Falls all day long with 22 departures from Union from 5:30 AM to 10:43 PM - it's a guaranteed connection in Burlington.
Or if you want to take the train, VIA/Amtrak departs Union at 8:20 am and arrives Niagara Falls at 10:16 am. The return trip is at 5:45 pm arriving at 7:41 pm - though probably a bit iffy, given the train comes from New York City. But you can check to see if it's running okay, and take the 6:12 pm bus if it isn't (arriving Union at 9:11 pm).
You have to take the 5 pm train, not the 5:15 train, to catch the 6:01 pm bus from Burlington (the 5:15 doesn't get to Burlington until 6:06 pm). So only 16 minutes longer travel time on the train - and 5 minutes slower on the bus for St. Catharines, because there are only NF express buses, not St. Catharines express buses.
Once they stop padding the train schedule by 20 minutes for the reverse manoeuvre at West Harbour, the train will be faster - and presumably more predictable.