Think of it this way. The battery gauge is set to always read 0 volts, but when voltage is applied, it is FORCED to read as that particular voltage. When you turn the ignition off you now have zero volts going to the gauge, but the needle (for a fraction of a second) is still in the same spot showing voltage. Since it is not a digital readout and the needle has physical mass, it cant instantly go back to zero. The needle then moves as quickly as possible back to zero, but remember that physical mass we just talked about? The weight of the needle forces it to go past zero, just like you would find if you bent a spring one way and let it go.
A new gauge has a dampening effect built in to avoid quick spikes from showing up on the gauge and to keep it from moving quickly (look at how slowly your gas gauge moves). As the gauge gets older, the dampening effect wears out, allowing the needle to move quicker. After many years of off and on cycles of the ignition (i.e. the battery gauge needle moving), it wears out the dampening effect enough to the point that when the gauge tries to move back to zero, it goes past zero far enough to the point that it hits the bezel to the left of it. After many times of the needle hitting the bezel, it wears a small spot on it which eventually causes enough friction to allow it to stick. Since it is not a lot of friction and the battery gauge wants to return to zero, a quick tap on the dash usually frees it up.
The band-aid fix for the problem is to sand smooth the small spot on the bezel that the needle has worn into.
The permanent fix for the problem is to replace the battery gauge with a new one.
Any questions?