With two gimbals, the angles of the gimbals can effectively move to allow the flywheel to point in any direction with respect to the frame. This much is clear to me, since the flywheel direction is only one vector (as opposed to a coordinate system) and you only need two angles, like yaw and pitch or spherical coordinates, to rotate a vector to any direction.
I think the third gimbal has to do with the fact that, because the flywheel's direction is 'just' a vector, the flywheel's direction with respect to the frame orientation is not unique. You could rotate a given local coordinate system around the flywheel direction and every rotation would be a possible orientation with respect to the global coordinates (for a given flywheel direction in local coordinates).
I am not clear in how a third gimbal would fix that, though. Although in my head I can understand that yaw-pitch-roll rotation steps each occur by rotating one of the gimbals, and that together they give a well-defined orientation, I can't seem to reconcile that with the aforementioned fact that the frame's orientation should not be uniquely determined by the flywheel's direction.
Does that issue, as I suspect, have to do with the concept of gimbal lock? (which I am also having a bit of trouble fully understanding) At first I was under the impression that the main practical issue with gimbal lock was requiring very fast, frictionless movements (or even flips). I wasn't sure about the implications of "losing one degree of freedom" (I could see one angle was made redundant, but I thought without friction everything would still be normal after moving away from 90° pitch*). Now, my intuition says even under in an ideal, frictionless environment, going in and out of gimbal lock will mean that we may suddenly have switched to one the wrong orientations (as in, even if the flywheel direction is correct in local coordinates, the yaw-pitch-roll reconstruction of our orientation based on gimbal angles would be wrong).
What I've said so far may be somewhere between a little and completely off, but if it's close to correct, then my last question is: what prevents us from going into an incorrect orientation when not gimbal locked. For instance, if initially the flywheel is pointing along the roll axis**, then what prevents angles of, say, 0° yaw, 45° pitch, 0° roll from drifting to 45° yaw, 0° pitch, 90° roll (in both cases the flywheel direction would be the same in an aircraft's local coordinates).
P.S. It's hard to google for gyroscope because a lot of the results are about the sort of spinning top device that is also called gyroscope or about the gyroscopic effect.
* In the case of using angles yaw-pitch-roll, applied in that order, to describe positions.
** If my understanding is correct, angles, starting from the initial/zero-angle orientation, are applied from inner gimbal angles first to outer gimbal angles last. Assuming the flywheel is in the inner gimbal, and considering the inner gimbal axis must be the yaw axis, it should be okay to have the flywheel pointing along the (initial) roll axis (and what would not be okay would have the flywheel pointing along the yaw axis, since it must be perpendicular to that).