When the float rides at the top ( full tank of fuel ) and you have an intermittent contact on the resistor element, it will cause the problem you're describing.
After you've used up some fuel, the feeler does not contact the defective area anymore, and the gauge will work fine.
Sounds like a new sendingunit is in order.