Even more than what caused the problem, I’d love to know how Kepler reoriented herself by herself.
IIRC, Kepler had a backup program that used the radiation of the Sun to determine alignment, in case the gyros weren't working. Left on her own, she resorted to this tactic. Guess it was a good plan.
One item of interest on the Kepler spacecraft is a "star tracker". I don't know which kind, but I read up on what I believe are similar systems.
The star tracker I read about is evidently a self-contained system which consists of a two-inch telescope, a ccd sensor, map data of the relative positions of stars, and a computer which runs algorithms to identify which stars are presently in the field of view of the star tracker.
The field of view is about 10 degrees square, so it covers quite a bit of space (about 3% in each direction). The device communicates with the rest of the space craft using a serial interface. The spacecraft, once it knows where the spacecraft is presently pointing, can then use its thrusters to make minor adjustments in its attitude until the star tracker reports that it is looking in the preferred direction.
The spacecraft no doubt also has the data to calculate the present time and uses that to predict where the earth is for purposes of pointing its communications antenna properly to establish communications.
The spacecraft is probably equipped with algorithms to determine whether or not it is still in communication with earth and, if not, to double check its attitude and make corrections if necessary. There is probably some degree of redundancy in its capabilities, so if one attempt isn't successful at restoring communications then an alternative is tried.
If anyone reading this has more information or corrections for what I have written, I'd be glad to hear it.