Its almost always the sending unit that fails, causing the gauge to stop working. Fortunately, the unit is easy to access. Remove the trunk mat and you'll see a round cover held in place by one or two screws. Remove them and the unit is visible. Remove the screws holding the unit in place and pull the unit from the tank. Just be careful and do this in a well ventilated area because of the fumes.
You can test the unit with a OHM meter. Set the meter to something like 20K OHMs and attach the leads, one to the center post and the other to the housing. Gently push the float rod up and watch to see if the reading changes. If it does, the unit working. If not, replace the unit. They can be cleaned but it is a delicate operation because of the risk of damage to the contacts.
Another culprit could be the float. They either fill with gas and sink to the bottom of the tank, or they rot.