The entire poem is about the destructive and regenerative power of nature and how poetry itself is like nature: particularly like the ebb and flow, death and life: the cycle of nature. Shelley sees his poetry as something that may not be well understood now, but may someday be a voice of regeneration - I think on a large scale - regenerating humanity with History being the cycle analogous to the seasons and nature.
All that being said, the poem is up for interpretation of anything along those lines, certainly the death of a child. In the first few lines, you could compare this death to a leaf:
Thou from whose unseen presence the leaves dead/Are driven like ghosts from an enchanter fleeing.
The winged seeds where they lie cold and low,
Each like a corpse within its grave,
Here the "seed" is more closely analogous to a child because a seed is young in the plant life cycle and being "like a corpse within its grave" implies a death too soon.
Overall, the speaker is talking mostly about his own death, so a stronger connection between this and the grief of a parent who's lost a child might be better stated if you said the parent (speaker in the poem) contemplates his own death in empathy with the child.
In the end, the comfort is in the cyclical nature of life and death. The last line sums it up perfectly:
If Winter comes, can Spring be far behind.
Winter = death. Spring = life, rebirth.
In fact, in the last stanza Shelley says "by the incantation of this verse/Scatter from an unextinguished hearth/Ashes and sparks, my words among mankind!"
Here, he treats his poem as a prayer offered, to comfort him and others, because he thinks poetry has the same regenerative/comforting power as Spring and nature themselves.