The attitude indicators need to have devices in them to correct for precession in the gyros caused by turns. The system used in mechanical gyros is based on a collection of pendulous vanes. Basically, for short times the gyro controls the attitude indicator, for long term the pendulous vanes are pulled by gravity in the direction of "down" and they adjust the gyros to keep them oriented correctly. More advanced attitude indicators use different technologies to detect "down", and use that to correct the orientation of the gyro, but they are all, fundamentally, linear accelerometers like was used in the original Wii controller before they added gyroscopic sensors in later versions.
Edit, just to make it explicit: the problem of keeping the horizon correct in spite of the Earth's curvature is small compared to the problem of precession caused by turning. So, solving turning precession solves curvature for free.