I don't think anything practical could have been done much earlier than it was, for a couple of reasons.
For example, the ancient Greeks and Romans had the capability to make gears. But as far as I know, they were made by somebody filing one tooth at a time with a file, not on a gear-cutting machine. So they weren't precise teeth, weren't involute gears, etc. Meaning they worked, but wouldn't be long-lasting or efficient. I think the same people could have made something resembling a bicycle chain, but it would have involved filing out link after link by hand, the result would have been expensive, imprecise, and made of fairly soft metals.
Another issue is ball bearings, or the lack thereof, which we take for granted in modern bicycle construction.
Much of the success of modern bicycles is due to the availability of modern roads, and lacking them would have made any such contrivance more difficult to ride.
Edited:
Videos of interest:
https://www.youtube.com/watch?v=nasF4-CSOQA
https://www.youtube.com/watch?v=FbNOba3Ot3w
Note that these are primitive-looking bikes, but may still use more modern bearings, roads, tools, etc.- may or may not have been easily buildable 500 years ago.