Robert Gesink took victory at the Grand Prix de Quebec in a drag race to the line after an exciting finale.