I replaced the wire from the sending unit to the gauge itself, which of course was the last thing I suspected and checked.

I removed the sending unit from the tank and tested its movement with new temporary wires, testing first the ground then the (sending unit -> gauge) and replacing that wire fixed the problem.