I'm surprised how much I'm seeing gyro brought up in these comments. It's a factor, but it's practically negligible. It's all in the steering. Start to tip right, and you'll subconsciously steer slightly to the right to correct your balance. Try to ride as slow as you can and you'll find yourself doing these corrections much more frantically and dramatically. The reason for that is because it takes longer for the wheel to roll under your center gravity and "catch" you when you're going slowly so you have to turn in quicker to maintain balance.
Notice that on almost every bike you see, the front axle on the bike is slightly ahead of the neck's axis of rotation. That offset does two things: 1. It stabilizes the steering so that the bike will tend to steer straight and 2. (more important to my point) It makes the balance-correcting effect of steering more immediate and dramatic, making it much easier to ride at slower speeds.
As a counter argument showing why gyro is barely a factor, these exist:
Edit: if you're not seeing the image like I'm not, Google "ski bike".
It's pretty common to bring up gyroscopes for this when people know a little bit about physics. It's all over motorcycle forums, for instance.
As you say, it doesn't work. Experiments have been done where they attach a counter rotating wheel to cancel out the gyroscopic effect, and while it's a little wonky to ride, it works fine.
IIRC, we're not 100% sure how bikes work just yet. Every time somebody comes up with a model that seems to be good, someone finds a counterexample that throws it in the bin. Even your explanation of bike trail isn't all the way there; Razer-type scooters still work without trail on the front wheel.
I figured it was pretty obviously the rider that's making the bike not fall over, not the bike itself.
If the bike's ability to remain upright while moving was a natural feature, then why would you ever need to learn how to ride bikes? You could just sit on it and go if that was the case.
It works on its own. If you push your bike along with a good run and then let go, it'll stay upright until it slows down too much.
Learning to ride a bike is mostly about being confident enough to let the bike work itself out. It gets more stable as it goes faster, but it's natural to be afraid to go faster when it already feels unstable at low speed. Then there's a little bit to learn about countersteering, but most people figure that out without being told it's even a thing.
Then why does going faster also make it easier to balance on something without steering, like a snowboard?
My assumption is that when you're standing still relative to the ground you can fall in many directions, but once you start moving momentum limits the directions you can fall to the ones in line with your motion. So the faster you're moving the fewer directions you need to worry about.
Snowboards definitely have steering, you twist the board and shift your weight to manipulate how the edges contact the snow, it's just not quiet as explicit as a bikes front wheel. But whether it's a bike, a board, or literally any moving thing on land, the steering happens because you applied a lateral force to the ground and an equal and opposite force was applied back to you.
The snowboard uses different methods of applying that force, but other than that it's the same concept as described in my first comment: Greater speed allows more subtle corrections to take effect more quickly.
Now the snowboard does have a wider contact area with the ground, but that really only helps you on flat ground at very low speed, or standstill. Advanced boarders will carve transitioning from edge to edge most of the time.
I'll admit, I don't know much about snowboarding, but what I was trying to say is that it's generally easier to balance at higher speed, even if you can't steer it.
Imagine stepping onto a frictionless surface, without being able to push off the surface you would quickly lose balance. But if you had a running start you could more easily keep balance as you coast along.
I'm not sure if it's as simple as response time, I would imagine it could even work with something inanimate. Stand a box on its edge and it'll fall right over, but slide it on that edge and it can balance for longer.