This is a cool trick for cleaning up steel and cast iron stuff prior to painting. It works! I've used it for this same purpose only instead of painting my burner, I simply coated it with silicone spray. The silicone sort of bakes on the steel, preventing rust and giving it an almost paint like black finish. Most paint, unless something very exotic, won't withstand the high heat of a burner flame anyway regardless of what it says on the can. The burner grate takes the brunt of the heat and the upper part of the frame. Usually the leg supports are far enough away from the flame that they don't get scorched too much.
Electrolysis Cleaning Method
Be careful if you use a car battery for this. An automobile battery can put out a huge amount of current in an instant. Enough to weld with for short periods I am told! It's DC current, so the danger is not so much electrocution as it is for fire or explosion if there is a direct short somewhere.