’68 Polara Fuel and temp gauge issue

Hopefully someone out there has some insight on this. My fuel and temp gauge are intermittently working, sometimes when the car is started they work, sometimes it takes a little tap on the gauge cluster to get them to move, and other times both gauges start sweeping back and forth simultaneously. My first thought was a bad or loose ground connection, but the dash lights work just fine.

Also can anybody tell me what is the purpose of the electrical condenser (similar to what you find in a distributor) on the back of the instrument cluster? It appears to be connected to the fuel gauge.

Thank you all!
Author: scotty