Actually, Gandalf showed no surprise that Sauron might be returning - only that the ring was indeed the One Ring and that his friend Bilbo had possessed it all this time.
Here is a transcript of the conversation that he had with Frodo after they put it in the fireplace, thus confirming that it was The One Ring:
Gandalf sits smoking at Frodo’s table, staring intently at the ring
sitting in the middle of the table. Frodo pours hot water into the
teapot on the table. Both of them watch the ring as if it might
Gandalf: This is the One Ring, forged by the Dark Lord Sauron in the
fires of Mount Doom, taken by Isildur from the hand of Sauron himself.
Frodo: Bilbo found it. In Gollum’s
Gandalf: Yes. For sixty years the Ring lay quiet in Bilbo’s keeping,
prolonging his life, delaying old age. But no longer, Frodo. Evil is
stirring in Mordor. The Ring has awoken. It has heard its master’s call.
Frodo: But he was destroyed. Sauron was destroyed.
Gandalf: No, Frodo. The spirit of Sauron endured. His life force is
bound to the Ring, and the Ring survived. Sauron has returned. His
orcs have multiplied, his fortress of Barad-dur is rebuilt in the land
of Mordor. Sauron needs only this ring to cover all the lands in a
second darkness. He is seeking it... seeking it... all his thought is bent
upon it. And the ring, it yearns above all else to return to the hand of its
master. They are one... the Ring and the Dark Lord. Frodo... he must
never find it.
Frodo picks up the Ring from the table and moves quickly into the next room, looking about wildly for a possible place to hide it. Gandalf follows more slowly.
Indeed, if anything, Gandalf's words indicate that he already knew Sauron was back and amassing power in Mordor. Perhaps he thought they would have more time since the ring was lost, but he now finds that it was hidden almost in his own pocket all this time.