According to English grammar, if an auxiliary verb ("to do", in this case) is present, it is the only one that conjugates, while the main verb remains in the bare infinitive form.
The sentence with "if" does not have an auxiliary verb, so in that case the verb "know" conjugates; while in the sentence with "does", "know" stays in the infinitive form. Consider:
Anyone knows; if anyone knows; maybe anyone knows;
Anyone does not know;
Does anyone know?;
Anyone does know;
Although the form "subject + does + verb" is not popular, it is pretty grammatical. This form is principally used to emphasize a fact, particularly to contradict a previous assertion, with emphasis on "does":
"I don't think anyone knows."
"This can't be. Someone does know!"*
3You're on the right track, but the choice between the two is determined by meaning, not popularity. "Does anyone know what we're having for dinner?" is a question. "If anyone knows what we're having for dinner, could you please let me know?" is a request. – Martha – 2013-01-30T00:15:37.337
@Martha Thank you for pointing this out. I fixed the ambiguous statement. "Latter form" was about "subject + does + verb" from my list, not about "does anyone know" versus "if anyone knows" – bytebuster – 2013-01-30T00:20:38.087
3+1 I would reword the last sentence: The form "subject" + does + verb is principally used to emphasize a fact especially particularly to contradict a previous assertion. "Someone does know", with emphasize on does. – StoneyB on hiatus – 2013-01-30T00:56:42.397