Gas stove, I’m guessing?
Cast iron grates can be “tanked” in a solution of water and ammonia to eat up the nasty cumulus after which you can address any stubborn bits with protective gloves and a Scotch-Brite pad.
Once they’re really clean, you’ve got choices. Barenaked cast iron’s not bad, but you might consider seasoning them with a very light film of oil baked on in your oven set on low.
A better option might be to black them out with a high-temp flat black stove paint. You can find the stuff at the local H/W store, and it’s good up to 1,200F. Verify the specifics on the label before you by to ensure you’re getting something that’ll take some heat. So called “engine paint” is available that can take it pretty hot, too.
Apply the paint, let it dry, then bake the grates in the oven at about 250-300 for 30-45 minutes. Be sure and run your ventilation fan to avoid any accumulation of odors from the paint as it cures.
If you want to get righteous, check with your local metal shop about Cerakote finishing.
Water and ammonia. I’ll have to try that, some warm day when we’re out doing yardwork anyway.