ECO stands for emergency cut-off. It is a fusible link (one time use). If your water heater thermostat goes bad and doesn’t shut off, the ECO will melt and cut off the milivoltage to the gas valve and it will shut off.
to be more precise, it stands for Energy Cut Off and electric water heaters also have them, except they are resettable by depressing the red button. Their function in both gas and electric heaters is to disable the heating source if the thermostats fail to function properly. They are an imperfect second line of defense, since the temperature/pressure relief valve should operate before the ECO and make it unnecessary.