You didn't say what make of vehicle or the year, which might help. Be sure the negative side of the battery has a good body/frame ground, check it at the time you experience the problem by placing a digital voltmeter across the negative side of the battery and an exposed point of the body. There should be very little voltage measured there...something in the order of
30-40 milliamps with accessories on. If in the order of half a volt or more, for sure that is a problem.... secure, or improve the negative side connection of the battery to the body.
If okay, at the time of the problem, using a digital voltmeter, measure the voltage at the battery with engine running... it should be about 14 volts... 14.4 on a cool day. Then check the voltage between a ground and a few of the intrument panel fuses. The voltage at the fuses should be near the battery voltage... 13.8, or so, depending on accessory load. If it is mid, or low 12, there is a poor connection somewhere in one of the feeds from the battery, alternator... depending on how they are distributing the power. The other thing is, if it only happens when an indicator bulf is also activated on the instrument cluster, such as turn signal indicator... the cluster might have a bad ground as the bulb ground circuit often shared ground with the instrument guages... sometimes just the voltmeter. If there is a bad ground, the voltage drop across the ground will express itself as low voltage on the meter, since it is in series with the resistance of the bad ground. The engine ground is seperate and may be okay which will allow for proper charging measured at the battery, and engine cranking.
The stacked connectors GM uses on some of it's vehicles at the positive battery terminal can produce your symptoms too, as one supplies the starter current, the other feeds power distribution (often a point of poor connection), sometimes supplies charge current.... depending on the vehicle.
It's unlikely the guage itself is bad, but it happens.