Mat 3:13-17 Then Jesus came from Galilee to the Jordan to John, to be baptized by him. (14) John would have prevented him, saying, “I need to be baptized by you, and do you come to me?” (15) But Jesus answered him, “Let it be so now, for thus it is fitting for us to fulfill all righteousness.” Then he consented. (16) And when Jesus was baptized, immediately he went up from the water, and behold, the heavens were opened to him, and he saw the Spirit of God descending like a dove and coming to rest on him; (17) and behold, a voice from heaven said, “This is my beloved Son, with whom I am well pleased.”
John had already been made aware of the significance of Jesus, although we are not told how he knew. The voice from heaven described here confirmed this. However later the imprisoned and frustrated John was troubled that Jesus was not doing what he expected the Messiah to do:
Luk 7:20 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?'”
Jesus was able to reassure John by sending the messengers back to John with eye witness accounts of his miracles of healing the sick and preaching the gospel message.