DO NOT run a ground wire to a separate ground rod. If anything, that will induce another transient voltage into the ground conductor and metal piping system.
If the transient voltage is suspected as interfering with the thermocouple operation, temporarily connect a properly sized BONDING wire to the metal cold water supply pipe (and jump it over to the hot water out pipe so you are bonding all metal water piping together and there is no loss of continuity through the water heater piping connections) and run this to THE EXISTING ground connection (this may be a driven rod, a water pipe, to both, etc. as this varies according to the requirements of your local electrical inspection department).
The reason is that you are only allowed to have one equal potential ground plane and all ground connections must be bonded together to accomplish this.
After you have connected this temporary wire (you can try this with a 12 AWG for the temporary wire, but you will probably need to use at least a 6 AWG minimum for the permanent bond wire), turn your electrical main disconnect off (flip the breaker off or pull the fuse pull out to shut power off). Wait a minute or two and then turn power back on.
Try to re-light the pilot. If this solves the problem, you will want to permanently install the proper size bond wire so that it is out of the way, not accessible to physical damage – which will also hide the conductor from view).
If that does not solve the problem when you turn it off, you could leave the temporary wire connected until the next time you loose power to make sure there is no difference between you shutting power off and losing power. There may be a difference between the two as losing power is typically caused by something going wrong at the utility supply, which could produce voltage spikes, surges and other very short duration transients that you could not duplicate just by turning the disconnect off manually.
If this still does not solve the problem after you lose power the next time, then this was not the cause of the problem and you will need to check for other causes.
Something you could try next, and which is along the some line of thinking as the above, is the following. However, do not plan on leaving the water heater connected this way, this is for test purposes only. First, take a piece of 6 AWG copper stranded and two pipe / ground clamps, connect the clamps to the cold water line and the hot water line, connect the 6 AWG to the two ground clamps. Make sure this bonding jumper is located far enough from the water heater so you will not be removing it when you do the next step. Now turn off the water heater (gas valve to off) and the water to the water heater (you may have to turn off water to the entire house to make sure there is no pressure in the lines) and disconnect the cold and the hot metal piping lines from the water heater. Reconnect these lines using at least 3′ of copper from the water heater (to serve as a heat sink) connected to CPVC which is then connected to the existing metal water piping. Now turn the water back on and re-light the water heater. Turn off power as stated above, wait, turn power back on, and try to re-light the water heater.
If this has no effect, then there must be something coincidentally occurring when you lose power. This is because doing the above isolates the water heater from the metal water piping system and any transients in the metal piping. If this solves the problem, try to find out the cause of the transient problem.
Make sure to undo the CPVC connections you made above and reconnect as originally connected. You can leave the ground bonding jumper in place between the cold and hot water pipes as this cannot do any harm, it can only help with the required bonding of the interior metal water piping system.
We all forgot to ask: Has this always happened, or did this just start happening?