Early in the ministry of Jesus, John the Baptist is well aware of who Jesus is. Here's John, speaking in John 1:34:
Yet later on, he seems to be unsure. This is Matthew 11:2-3:
A similar thing is found at Luke 7:18-19. But this doesn't seem to be a difficult problem. John has been thrown in prison, and is perhaps getting a bit annoyed. He may well have expected the Messiah's appearance on Earth to be more... dramatic. At any rate, he begins to experience doubts and sends a message to Jesus asking for clarification. This strikes me as very human.
Needless to say, there are other possible explanations, some of which are explicitly non-infallibilist. One could say that Matthew and Luke are both reporting a traditional story, in which John has not yet met Jesus. This is plausible enough, but I don't think it's proven by the texts alone.
Updated: 2008-05-30
errancy.org - index