What makes smartphones tilt-sensitive? Will they retain this ability in zero-gravity conditions?
You are right, in a sense. These sensors do need moving components. However, they are a chip on your board.

Tiltsensors (actually, accelerometers), and gyroscopes (and pressuresensors, ...) are part of a family called MEMS: Micro-electromechanical systems. 

Using similar techniques as already common in integrated circuit fabrication, we can make amazing little devices. We use the same processes of etching away things, depositing new layers, growing structures, etc. 

These are incredibly tiny devices. this is an example of a gyroscope: 





link to the original website. 

Most of these work by sensing changes in capacitance. A gyro would sense the changes due to rotation (the big thing in the picture would twist around the center axis. This will bring the tiny teeth that are interleaved closer together, and increase capacitance. Accelerometers work under a similar principle. These teeth can be spotted in the rightbottom corner of the second image. 

What about zero-gravity? 

It would not change much in terms of the functioning of the devices. You see, accelerometers work by sensing acceleration. The key however is that gravity is the same to them - it just feels like you are being accelerated up at 1G, all the time. They use this "constant" to get an idea where "down" is.
This also means that while the chips will function just fine in micro gravity, your phone would not - it will be confused as there seems to be no "down". 

Quick addition to address a (very good) point that user GreenAsJade brings up: When you look at the common definitions of gyroscopes on sources like wikipedia they are often described as something along the lines of a spinning disk. The pictures above don't seem to have any spinning parts. What's up with that?

The way they solve this is by replacing the rotation with vibration. The disk shaped object in the pictures here are only connected with very thin and flexible structures to the center axis. This disk is then made to vibrate around it's axis at high frequency. When you move the entire structure along an angle, this will cause the disk to try and continuously resist this - similar to a classic gyroscope. This effect is called the Coriolis effect. By sensing the amount of tilt of the disk compared to the surrounding solid material, it can measure how fast it is spinning.