My grown rescue dog was afraid of those! You would be proud of him now, he stands right at the edge and sniffs down inside them.
What I did? Nothing. The art to doing “nothing”...you act casual, kind of bored. Leash is loose and you let him make a wide circuit or cross the street if he wants. If he happened to walk up close, I would say,”wow! brave!” in a pleased tone. He kind of cured himself, at his own pace...it was gradual, but more and more I noticed that he would go right up to the edge and stick his nose down and have a sniff when we went by.
If I wanted to hurry the process along, I might try this: he is planted near grate refusing to walk. I take a tasty treat out of my pocket, show him and call to him, give gentle tug on leash, and wait. After a few minutes I bet he would gather his courage and walk by the grate to get to his owner and his treat! After several repeats ( maybe few days or a week?) I bet he will be willing to pass grates...although they may never be his favorite thing...
Rumo ~ rescue shepherd/husky mix