If the gauge is good and the sender is good:

- bad lead/wire to the hot side of the gauge (doubtful)
- bad lead/wire between the gauge and sender unit
- bad ground-contact of the gauge unit to the gauge-cluster-housing (and/or of the gauge-cluster-housing to ground)
- you could also have a bad ground at the sender unit but this would not give you the problem you describe (this bad ground connection would result in a gauge always moving from "Empty" to "Full" when power is supplied to the gauge, no matter how much fuel you have)

Tim