The gyro senses any rotation in the axis it is setup to work in, and provides correction to unwanted movement via the steering servo. There are some gyros that work on two axis at the same time, but for an application like this a single axis gyro is sufficient. If you use a "heading hold" gyro like the GY401, the gyro will compensate in a way such that the car will maintain it's original heading (or any other heading you tell it to follow, ie steering input from you) regardless of slip in traction or other factors. So, theoretically a car with a 401 gyro should maintain a straight line even if the trim happens to be off. In fact, if you use a 401 you can't adjust the steering trim because it will affect the gyro's ability to perform like it should. You would just set the steering trim at center and the gyro will take care of the rest to ensure the car drives straight.
It's a lot more complicated than that, but that's the jist of it.
MTBikerTim
I'm not sure how bad of a crash it would take to destroy a 401, and I don't intend to find out.



I do know that gyros need to be mounted using padded double stick tape in order to cut down vibration transfer to the gyro. This is necessary to get the best performance out of it as possible and also to protect the electronics.
crazyjr
I've used that gyro before when I got started in helis, but I had bad experience with it. It died within a few flights, got it replaced at least once or twice and did the same every time until finally I gave up on it. I never did find out what was causing it to die.