Makes sense, that relay cuts out the headlight when the starter is engaged, presumably to allow more current to flow to the starter, and it also engages the solenoid, hence the five pins. Could just simply be corrosion in the relay and the contacts aren't working in either the latched or unlatched state.
Could be a loose or corroded relay socket. I think I might shoot some cleaner in the socket and burnish the pins first...