Bad sensor or bad gauge?

Disconnect the sender wire from the gauge.

Then check the resistance from the wire to chassis ground.

There could be a short or a high resistance in the wire