How does one separate the acceleration due to gravity from other motion in accelerometer input?
When working on Wii titles, i found that a low pass filter on the accelerometer reading could be used as a reasonable approximation of the gravity vector component. Subtracting this from the real values then left me with a good basis stream for instantaneous gesture analysis. My low pass was around 1hz (just the average of enough packets of data) but tweaked dependent on the gesture being developed.
That really depends on what you are trying to do.
If you are planning to use the accelerometers for navigation (essentially building an inertial navigation device) you need to keep track of which way is down in your integration cycle. If you device is being accellerated with an accelleration equal to g in a lateral direction and you have no measurement history, you have no way of telling which is which.
If you are using the accelerometers as a sort of tilt sensor you can just assume your measurement is gravity, that is your local down vector. Decomposing it along the device's body will yield the orientation.