How can I connect a WIFI thermostat to a Honeywell R845A switching relay?
According to this document, the internal wiring of that relay looks like this.


  


It sounds like it's connected something like this.



When the thermostat calls for heat, the T terminals are connected through the thermostat. This causes the relay to energize, which closes the contact between terminals 5 and 6 (It also closes a contact between 3 and 4). When terminals 5 and 6 are connected, the heater, pump, valve, etc. turns on.



Because the transformer is built into this device, it's going to be difficult (possibly impossible) to connect a C wire. You'd have to connect the wire to the other side of the transformer, something like this.



You'll also have to check with the manufacturer, to determine if the transformer can handle the additional load of the thermostat. 



You might want to contact Honeywell, to see if they offer a similar relay that exposes the C terminal.  If they do, you could replace this device with the one with the proper terminals.



What you're trying to do, is something like this.



Which as you can see in the diagram, is not going to work so well.