Protagonist: Gosh, Doc, I feel like I'm going crazy here. There's this nice, attractive person with whom I've spent a lot of time lately, and now everybody is giving us knowing looks and making veiled comments and stuff. What could possibly cause them to do this?
Fictional Psychologist: Do you think they assume you and that nice, attractive person are romantically -
Protagonist: WHAT? I'M SORRY, I CAN'T HEAR YOU.
Fictional Psychologist: Do you see the two of you as -
Protagonist: Absolutely not. There is no way that could possibly be the case. Maybe you should see a Fictional Psychologist, you crazy person.
Fictional Psychologist: Is there a reason you feel so -
Protagonist: DESPITE HAVING REASONABLE SELF-ESTEEM IN MOST WAYS, I AM UTTERLY CONVINCED THERE IS NO CHANCE THAT ANYONE IS ATTRACTED TO ME ROMANTICALLY. TO SUGGEST OTHERWISE IS MADNESS.
Fictional Psychologist: You don't think that's a little -
Protagonist: I'M LEAVING NOW.
I feel like I see this all the time, sometimes in awesome books, sometimes . . . less awesome.
Done carelessly, it can be ridiculous, but there are actual reasons to make your protagonist a little dense about these things. Many people can identify (up to a point) with someone who feels lost and confused when it comes to love, especially if the character is inexperienced with romance. You can also risk making your protagonist seem big-headed if s/he guesses too easily that s/he might be the object of someone's affections. Then, there's the fact that many stories require the protagonist and her/his romantic interest to hold off on their *gasp* WE ARE IN LOVE moment until the end.
When this doesn't work, it's often because the author seems not to have considered the protagonist's personality when inserting this little blind spot. If a person has no serious self-esteem issues, and particularly if s/he has been in a romantic relationship before, the idea that another person finds her/him attractive should not be a huge shocker. Indeed, it may be that s/he should really catch on earlier rather than later, and that if you want to avert this, you'll have to find another way to do it.
Be especially careful with excess modesty in more general areas. If a character believes s/he is not good-looking/smart/talented/capable, but actually distinctly is good-looking/smart/talented/capable/ESPE
It all comes down to that oh-so-common dilemna of how to do the things that you need for the plot in a way that works for the story.
And now, for something completely different: stop words!