Bad sensor or bad gauge?

Most sender units just have one wire that goes directly to the gauge.
Your test of grounding that wire generally means the gauge is working like it should.

Note that the body of that sender must be grounded for it to function, so products like teflon tape are a no no.

I did a fair amount of plumbing work at my last job so there is a good chance I put tape on the threads here too.