Depends on what you mean by 'bicycle' and what you mean by 'train'.
If by train you mean a steam locomotive pulling cars on rails, then that long preceded the safety bicycle design we know as the near universal bicycle of today. Even the impractical penny-farthing bicycle came later than commercial cross country railroad, by a couple of human generations.
If you get to enlarge the definition of bicycle to include foot-on-ground straddled wheeled-hobby-horse of ~1810 then the steam railway on iron rails still wins by a human lifetime, but in local mine usage rather than as a public utility.
Heck, if you get to include all human-powered two wheelers, the train, read just as loosely, stretches all the way back to any two sleds in tandem. And that's a long way back.