Dude, intelligence is not nearly as useful in this world as we are made to believe.
And, you say you are smarter than him? That automatically makes it so that I would never want to work under you. People that tend to waste cycles on comparing their intelligence to others tend to be insufferable, egotistical, and boring. (To say nothing of the fact that intelligence is largely incomparable.)
Management need people that make good, obedient little minions for upper management. Who can make their bosses look good while simultaneously shielding the team from them. You don't have to be 'intelligent' to do that, in fact it might make the job harder.
> I feel incredibly stupid. I am losing confidence in making good decisions.
Why you gotta be so extra about it? You lost out. Big deal. Pick yourself up and move on to the next opportunity.