The best thing that happened to me in college was almost failing a freshmen physics test, despite having felt I was prepared for it. After getting that grade, I worked nonstop nearly every waking moment.
I ended up getting an A- in the class, even though that test was at least 15% of the final grade. More importantly, I learned that if I want to do well, I needed to work hard.
When I got to college, on my first calculus quiz I got a C+. It's a good thing this happened right away. After that, I realized I needed to actually learn how to study and ended up putting in a great deal of effort, unlike in high school where I could get good grades easily. I ended up graduating with all A's.
One of the things I remember from the very beginning of first year is professors saying how engineering was good because after 4 years you'd learn enough to get a junior position and actually start learning. I thought they were just screwing with us frosh, but after 4 tough years, I saw how right they were and I realized that I really learned two things:
1) how to learn
2) that I know nothing.
In addition to the work and learning over innate smarts mindset, it is also good to know what kind of environment you need to actually learn and excel. Some people might have enough curiosity and work ethic to learn and do a lot while left to their own devices, whereas other people might need to be an environment where they're being pushed.