Windows Phone applications cannot run continuously in the background.
Additionally there are only a certain APIs that can be used in background agents. The Gyroscope
is in the Miscrosoft.Devices.Sensors
namespace and this is one of the namespaces that cannot be used.
Even if it was possible, the best you could do would be to have it run for a few seconds every half hour or so but this would be, I imagine, of very little value.
So, in summary: you cannot use the gyroscope in the background.