Michael Faraday invented the soleniod, and by proxy the relay. First real use being the telegraph, by Morse, as it was the tapper on the other side. So I don't think from there it was too far of a jump to say the first inventor of the relay as we know it. Although, some dispute the real invetor of the telegraph to be Edward Davy, or
Joseph Henry?