I had a similar problem after washing the engine.
I pulled the connector off of the temp sensor and found it was wet inside. Drying out the connector and plugging it back in fixed the problem.
On my 6 cyl engine there are two temp sensors underneath the intake manifold on the left side of the engine. The gauge is connected to the one closer to the rear of the engine. I think the location on your 4 cyl engine is similar.