Sounds like the connector at the back of the gauge is loose or corroding. Unfortunately, this means removing the dashboard and cleaning the contacts on the back of the cluster. On the good side, you can change any blown dash light bulbs
Only other thing I can think of is that it's actual connector at the sensor - might need to have it's connections crimped back togethor?