Maybe pull the gauge cluster out and clean the connections good, might help.
I did this to mine last weekend. Took the nut off and pulled the connection plug and sprayed some contact cleaner in the gauge holes. The copper traces on the mylar wiring conduit were a little oxidized too.
Gauge still bounces around a little, but I ran it down until it was bouncing around indicating (on average between minor swings) a 1/4 tank left- went to get gas and it took 12 gallons to fill it- so it seemed to be working in a general sense.
Maybe a better cleaning would've helped, as I was more concentrated on fixing the temp gauge, and just getting the gas gauge to read anything at all-it was stuck reading "E" all the time.
88 YJ (Red) 2.5L, AX-5, NP231, Dana30/35 Posi-Lok, 4" RC Suspension, 1" Daystar Body, 33X12.50/15 BFG KM2's, Schrockworks Sliders. Vortec 5.3/4L60 conversion in the works.