gas gauge

If the blue wire was shorting to ground the needle would peg on full. Most likely you have a loose connection somewhere that opens the circuit occasionally as you drive. If there is gas in the tank and your needle moves between empty and whatever level of gas you have in the tank, you might check to make sure the connection to the sending unit is clean and making a good connection. In addition there is a connection for that wire behind the driver's kick panel and then again at the connector on the back of the instrument panel. Make sure all those connections are clean and solid.

OK lets consider the tank to be well below full, only an intermittent short to ground would take the needle to full. The loss of ground condition would take the needle from off/empty to wherever the fuel actual level.
So now we ask needle swings from empty to 1/2, empty to 3/4, other ?
Do you have any idea what the fuel level currently is ?
If you recently filled up you could continue to drive it and watch the needle swings for changes in range of travel which would help in longer slower diagnosis.
Also keep in mind that a failing instrument voltage regulator can also cause wild needle swings. This condition would effect the temp gauge also, just not as extreme.