Are you sure the sensor is not just dangling out of the firewall still attached to the tube? If it is the typical gas operated gauge, (not electric) it can't be detached from the tube which is also part of the gauge. If the sensor has been detached/broken the whole thing is toast and you will need a new gauge.
Kurt