The attitude indicator is self-correcting, but the directional gyro is not.
Now, the obvious follow-up question is: how does the attitude indicator self-correct?
Strange as it sounds, the occupants of an aircraft (and the word "occupants" here includes the instruments) have no way of sensing which way is down; there's no way they can determine the direction of gravity. What they can sense is "proper acceleration", which is the combination of gravity and acceleration.
In steady flight, there's no acceleration, so the force that you feel is just gravity. But in a coordinated turn to the left, it still feels like gravity is pulling you straight down into the floor, even though it's actually pulling you down and to the left! That's why the attitude indicator and the turn indicator are needed; you can't determine your bank angle without gyroscopes.
So, how does the attitude indicator determine which way is down, if the occupants (and the instruments) of an airplane have no way to detect the force of gravity? Well, there's good news: over long periods of time, the force of gravity is strong and constant, whereas acceleration averages out to nearly zero.
So, an attitude indicator essentially watches the proper acceleration over a long period of time, and takes an average, and assumes that that's gravity.
If you somehow managed to accelerate straight forward for a long period of time, the attitude indicator would think that you're pitched up. But that's easier in an SR-71 than in a Cessna 172.