If the fan comes on when you disconnect the sensor, then you know the relay works. You have a command problem. To diagnose this correctly, you need to have a scan tool plugged in, and see when the temp climbs high enough, if the PCM requests the fan to come on. If the request is there, but command never happens, then you have a bad PCM. Another thing to watch is for a blown head gasket. Coolant sensors cannot read correctly if there is air in the system. A blown head hasket will pump air into the cooling system, causing erratic gauge readings, and eventually overheat.