Yep that the water temp sender. You can put that wire terminal to any handy ground source. Doesn't need to go to the battery.
If both gauges quit at the same time their power supply ( gauge voltage limiter ) is bad.
If both gauges quit at the same time their power supply ( gauge voltage limiter ) is bad.