I assume it is a Faria gauge, correct? We have had similar issues with the tachs on our '05 MS 400 and my guess is that Mainship wired your boat in the same incorrect way as ours.
It's a little difficult to explain, so my apologies for the awkwardness.
The gauges are secured in the dash by a plastic bracket on the back. The terminal posts for the ground, sender wires etc, are long bolts that extend through the plastic brackets. So to install the gauge you slip the bracket over the posts and thread nuts onto the posts, the same posts that hold all of the electrical connections.
Here is the issue. Mainship put the gauges in, then put on the brackets using a nut, then attached the ring terminals on the "outside" of the brackets and secured them with a second nut. This made the gauges easier to install, but the connections come loose very easily and they don't make good contact with the gauge. And to make matter worse, as you tighten the nut the bracket flexes preventing a secure connection.
The solution is to take off all of the nuts, pull off the brackets, then put the ring terminals onto the posts and tighten them up. Some of my posts were loose as well, but I was able to tighten them.
After the wires are on, slip the brackets onto the posts and put on a second nut and washer to secure the gauge. You don't need nuts on every post to hold the gauge in place, two will work fine.
A 5/16" deep socket on a nut driver makes this job way easier. I redid all of my gauges on both the lower and upper helm.
Hope that helps (and makes sense, lol).
Doug