Healing the royal official's son is one of the miracles of Jesus that appears in the Gospel of John (John 4:46-54). This episode takes place at Cana, though the official's son is some distance away, at Capernaum.
In the Gospel of John (NIV):
"Unless you people see signs and wonders," Jesus told him, "you will never believe."
The royal official said, "Sir, come down before my child dies."
"Go," Jesus replied, "your son will live."
The man took Jesus at his word and departed. While he was still on the way, his servants met him with the news that his boy was living. When he inquired as to the time when his son got better, they said to him, "Yesterday, at one in the afternoon, the fever left him."
Then the father realized that this was the exact time at which Jesus had said to him, "Your son will live." So he and his whole household believed.
A similar episode appears in the Gospels of Matthew 8:5-13 and Luke 7:1-10, as Healing the Centurion's servant. While Fred Craddock treats these as the same miracle, R. T. France considers them separate miracles.