A good place to start would be to make sure you use batteries when running motors. If you try running motors when powered only from USB power, the voltage is likely to be unstable, and many unpredictable things can happen.
Gyro sensors (such as the EV3 gyro) measure rate of rotation and integrate to determine accumulated angle. Essentially they are dead-reckoning, and that means errors will accumulate. To get truly absolute angle, you will need a gyro and compass with something like a Kalman filter algorithm.