The trainer level you are corresponds to the max level pokemon you can have (powerup). If you are a level 25 trainer for example you can have pokemon up to level 26.5 - the rule is your trainer level+1.5. if you look at charts it will show the max cp a pokemon can be at a certain level. in rare occasions you will encounter a cp that just shows ??? this is reflective that it is actually "too strong" for your current level. perhaps it would be a level 27 or 28 in my example. it would certainly be your highest cp pokemon. it it however catchable, and if you are able to catch it, you got a real nice break- but its extremely difficult (as confirmed by your story)
Dragonite with hidden CP figure
A few weeks ago I and a few friends encountered a Dragonite in the wild. Each of my friend had a CP figure presented on their respective Dragonite and were ultimately able to catch their Dragonites.
My Dragonite had three question marks instead of a CP figure and was horribly tough to catch. My poke balls were deflected and were even prevented from being thrown at the Dragonite. Ultimately the Dragonite escaped.
My experience gives rise to a question: What is the threshold value beyond which CP figures are replaced with question marks?
Answers
The ??? CP appears when the wild pokemon has a CP higher than the highest CP among your pokemon, and that is all. (So, nothing to do with level or with anything else, nevermind that. Plus, you probably ran into other situations like this along you journey, maybe you just don't recall, this time as it was a dragonite it stuck to your memory)