This rings true to me. They told me that if I worked hard, then I'd be successful by default. At some point in my early 20s, I realized that it wasn't true at all, and it hit me like a ton of bricks. I was severely depressed and felt like a failure, right up until the point where I accidentally stumbled into being a programmer and turned out to be good at it.
I know this feeling very well, made considerably worse by the fact that I happened to be friends with some people who for various reasons did end up being very, very successful. It took me a very long time to realise that they were the outliers rather than me being a failure, and I still doubt myself.