He says that his spirit strayed out of time and space -- i.e. it left the
"circles of the world" completely. In the text of T2T he only says that
he "was sent back." In one of the Letters (if you really want to impress
your friends let me know and I'll look up the exact reference for you) Tolkien
explains that it really was Ilúvatar Himself, the Creator, who sent Gandalf
back to finish his task. So, yes, Gandalf physically died. Ilúvatar
sent his spirit back, housed it in a new body (which is why Gandalf looked a
little different to Aragorn, Legolas, and Gimli), and had Gwaihir transport
Gandalf from Zirakzigil to
Lothlorien.
__________________________________
All that is gold does not glitter,
Not all those who wander are lost;
The old that is strong does not wither,
Deep roots are not reached by the frost.
From the ashes a fire shall be woken,
A light from the shadows shall spring;
Renewed shall be blade that was broken,
The crownless again shall be king.