Unfortunately, you can't get good readings from just a gyroscope. You need to take all the readings from accelerometer gyroscope and (optionally) a magnetometer. This is generally called sensor fusion, and you can find the sensors demo for an example of how to do this.
https://github.com/godotengine/godot-demo-projects/tree/3.0-d69cc10/misc/sensors
(or find it in the template section of the godot project screen)
If you want to code it yourself look into the madgwick filter, which was the best method I found.
https://x-io.co.uk/open-source-imu-and-ahrs-algorithms/
Note, this is really complex and there is about zero chance of you getting it working without a physical device you can test on. Once you see the code, you'll see it's much more complex.