Put an ohmmeter on the leads from the sender to the gauge. The reading should be between 0 and 240 ohms. If you have some gas in the tank, the reading will not be zero. In my experience, normally the senders go bad.
If that test is inconclusive, pull the sender out of the tank, reconnect the wires and move the float, while checking the resistance with the ohmmeter. If no change in reading, the sender is bad. Of course, make sure the wires make a good connection.