The battery gauge light gets power from a lighting bus, the actual gauge gets power from the ignition.
Can you get a look at the back of the gauge? You should see terminals marked LT, 12V, and GND. LT is the light and it is likely connected to a lighting bus. It's either your 12V or GND connectors that are either not connected properly or corroded.
Take a picture of the back of the gauge if you can.
2006 Bayliner BR205
A1 Gen 2 1.47
5.0 carb engine