The key point about hydrogen is that the cost of storage capacity (to be distinguished from costs related to charging and discharging rates) is extremely low. So if you need a system to cover very rare extended outages, or to store energy from summer for use in winter, hydrogen is much better than batteries.
Also, hydrogen can be mixed into natural gas, without changing much infrastructure. This is of course only a transitional measure, not an end goal, but doable now and a very cheap one.
When we get to high levels of renewable penetration on the grid, we are going to have tons of excess energy, and capacity far past demand.
We have that with current generation systems too; we don't run natural gas at full bore all the time, usually. Most generators run at a capacity factor far below 100%.
The difference is that renewables generate power at zero marginal cost, while a natural gas turbine has fuel costs and wear and tear.
So we are going to have massive amounts of super cheap energy, for those applications that are not time sensitive.
Hydrogen production through electrolysis would be a great way to store this extra, nearly free energy. However this is unfortunately not a perfect match the intermittent surplus of renewables, since the capital costs of electrolyzers makes it so that constant production would be best. But at least some surplus energy will go this route.
Storage has several options, for example we could store hydrogen only for short periods before converting to methane or ammonia or other more stable chemical forms. We could convert pipelines perhaps.
Hydrogen has a lot of difficulties, but it is also, even now, an essential part of our economy and we work with it at scale. It will be a while before "green" hydrogen from electrolysis is cost competitive with fossil fuel derived hydrogen, but it will almost certainly happen.
There's a great, but long, two part series on hydrogen in Europe from what most would call a very skeptical stance, yet as a fellow hydrogen skeptic it convinced me that hydrogen will play a much larger role in the future: