I'm probably more gullible than average, but I'm pretty sure that people less intelligent than me have done this when talking to me too. A few times, I've made an estimate that a fellow programming student is the same or slightly higher skill level than me based on talking with them, but then when we work on the same problems in class, I have an easier time than they do. (Not the same thing as intelligence, but related.)
You believe that you’re more intelligent than they are because you are able to do one task better than them (coding), yet it sounds like they were able to do another task better than you (being able to successful convince you that they were more intelligent). I’m not sure why the latter should be ruled out as a sign of intelligence.
I've never heard of anyone saying "I thought that person was really intelligent, but they turned out not to be", and when there are scandals about people with fake credentials, they don't seem to come from people with fake credentials making mistakes-- instead, someone checks the history.
It seems to me that you can find out a lot about people's intelligence by talking with them a little, though I've underestimated people who were bright enough but didn't present as intellectual.
The real problems are with identifying conscientiousness, benevolence, and loyalty-- that's where the unpleasant surprises show up.