Luke 7:18-30 (ESV)
The disciples of John reported all these things to him. And John,  calling two of his disciples to him, sent them to the Lord, saying, "Are you the one who is to come, or shall we look for another?"  And when the men had come to him, they said, "John the Baptist has sent us to you, saying, 'Are you the one who is to come, or shall we look for another?' "  In that hour he healed many people of diseases and plagues and evil spirits, and on many who were blind he bestowed sight.  And he answered them, "Go and tell John what you have seen and heard: the blind receive their sight, the lame walk, lepers are cleansed, and the deaf hear, the dead are raised up, the poor have good news preached to them.  And blessed is the one who is not offended by me."
 When John's messengers had gone, Jesus began to speak to the crowds concerning John: "What did you go out into the wilderness to see? A reed shaken by the wind?  What then did you go out to see? A man dressed in soft clothing? Behold, those who are dressed in splendid clothing and live in luxury are in kings' courts.  What then did you go out to see? A prophet? Yes, I tell you, and more than a prophet.  This is he of whom it is written,
" 'Behold, I send my messenger before your face,
who will prepare your way before you.'
 I tell you, among those born of women none is greater than John. Yet the one who is least in the kingdom of God is greater than he."  (When all the people heard this, and the tax collectors too, they declared God just, having been baptized with the baptism of John,  but the Pharisees and the lawyers rejected the purpose of God for themselves, not having been baptized by him.)
It’s a big chunk. People often wonder if John meant this question, or if he was just trying to shake his disciples off on Christ. I belong to the school that says, John was wondering. It isn’t any wonder. He is in prison, he is looking to have his head chopped off. He knows who Jesus is, but Jesus isn’t doing what he thought he’d be doing. Jesus is taking his time. The prisoners aren’t being released. Good men like John are being persecuted, wicked men like Herod are persevering. Can this be what the kingdom of God looks like? Isn’t the messiah supposed to be righting wrongs and taking names? At the very least John the Baptist is saying, “Jesus, get on with it, already.”
Jesus answers John the Baptist, in the affirmative. He is the messiah. The time for laying the axe to the root of the tree is coming, it is not now. The kingdom of God is come, and it is different than you imagined.
But he turns to speak on who John the Baptists is. He is the messenger that comes before, to prepare the way. This points then to who Jesus is. Those who had been baptized by John, they believed. Those who rejected John, they will also reject Jesus. Just as those who reject God’s law, will reject his Gospel. But it is precisely those, the Pharisees, who have rejected God’s law, who think that by it they can earn eternal life.