Timo, I saw that you found a partial solution to your problem (quote: "there is no gravity that hold the gyroscope in the right position"). I would like to elaborate because there are ways to get reasonably good results from a gyroscope only. I don't know if it will be good enough for your application. Here are the results I got using the same hardware as you: http://robokitchen.tumblr.com/post/68625623585/imu-with-gyroscope-only-i-tested-the-three-axes. In this video I am not using the accelerometer at all.
There are two points that could help you get better results:
1) Unless your sensor remains totally horizontal you cannot get the z-axis rotation using this formula:
float gyro_angle_z = gyro_z*dt + get_last_z_angle();
To explain why, imagine this: if your gyroscope turned 90 degrees around the x axis then 90 degrees around the z axis, you would not obtain the same result as if it only turned 90 degrees around the z axis. This means that you should compute the rotation around all the axes and then extract the z-axis rotation. If you don't use the x and y axes your results will be incorrect (unless your sensor remains totally horizontal).
One efficient way to compute the rotation around all the axes is to use quaternions. There is a lot to say about quaternions, so I let you do your own research and ask more questions if required.
2) After using all the 3 axes there will still be a static drift. This is because the gyroscope will not read a perfect 0 even when it does not move. To improve the situation, you could calibrate the gyroscope. An easy way to calibrate is to read a large number (100+) of values when the gyroscope is not moving, calculate the average drift, and subtract it from your measures when the gyroscope is moving. There will still be a slight drift after this, but not as bad as what you may be experiencing now.
Here are the best results I got, using the MPU-6050 gyroscope and accelerometer: http://robokitchen.tumblr.com/post/68626551378/imu-with-gyroscope-and-accelerometer-i-ran-the. As you already know the accelerometer helps stabilise the x and y axes but not the z axis. However the z axis drift is low and remains useable for many applications. For instance there are several quadcopters which do not use a magnetometer and suffer from z axis drift and yet remain useable.