There are actually two "Chimney Sweeper" poems: one in Innocence and one in Experience.
You can see them both in the full text of Songs of Innocence and of Experience, by Ctrl+F'ing for "chimney". The Innocence one which you're asking about runs as follows:
When my mother died I was very young,
And my father sold me while yet my tongue
Could scarcely cry ‘Weep! weep! weep! weep!’
So your chimneys I sweep, and in soot I sleep.
There’s little Tom Dacre, who cried when his head,
That curled like a lamb’s back, was shaved; so I said,
‘Hush, Tom! never mind it, for, when your head’s bare,
You know that the soot cannot spoil your white hair.’
And so he was quiet, and that very night,
As Tom was a-sleeping, he had such a sight!—
That thousands of sweepers, Dick, Joe, Ned, and Jack,
Were all of them locked up in coffins of black.
And by came an angel, who had a bright key,
And he opened the coffins, and set them all free;
Then down a green plain, leaping, laughing, they run
And wash in a river, and shine in the sun.
Then naked and white, all their bags left behind,
They rise upon clouds, and sport in the wind:
And the angel told Tom, if he’d be a good boy,
He’d have God for his father, and never want joy.
And so Tom awoke, and we rose in the dark,
And got with our bags and our brushes to work.
Though the morning was cold, Tom was happy and warm:
So, if all do their duty, they need not fear harm.
Its counterpart from Experience runs as follows:
A little black thing among the snow,
Crying! ‘weep! weep!’ in notes of woe!
‘Where are thy father and mother? Say!’—
‘They are both gone up to the church to pray.
‘Because I was happy upon the heath,
And smiled among the winter’s snow,
They clothed me in the clothes of death,
And taught me to sing the notes of woe.
‘And because I am happy and dance and sing,
They think they have done me no injury,
And are gone to praise God and His priest and king,
Who made up a heaven of our misery.’
When you view them side by side like this, it's pretty clear why the one you read counts as a Song of Innocence. It opens in a grim way, yes, but the vision of heaven towards the end of the poem goes a long way towards counterbalancing that effect. The way I see it, this poem is about finding hope even in the middle of despair, which is what puts it in Innocence. The chimney-sweeping children lead miserable lives on earth, but the fact that God is smiling on them gives them hope for a better life afterwards. Thus even a poor wretched child living in poverty can find some cause for happiness.
The Experience version, by contrast, is extremely dark and cynical all the way through. The child in this poem has been taught misery by its own parents, and the only mention of God is in conjunction with the "priest and king", the rich and worldly men who "make up a heaven of our misery". This is a vastly different vision of heaven from the one in the Innocence poem: a heaven for the rich built upon the wretched labour of the poor, rather than a heaven where the poor can finally find happiness.
Some of the Songs of Innocence are entirely 'innocent', about childen and nature and joy. But others have some shades of the world's evils in them, the 'innocence' stemming from the fact that goodness and joy can survive amidst, or even overcome, such evil.
Similarly, many of the Songs of Experience involve themes which are more often associated with Innocence - but these are always, in the end, overcome by darker themes. See, for example, "The Clod and the Pebble", in which the clod's hopeful outlook is overshadowed by the pebble's gloomy pessimism; or "The Garden of Love", which is about a place of hope and innocence which is finally bound up and besmirched by darkness.
Not all of the Songs are one-dimensional. Many of them contain elements of both Innocence and Experience, and their classification depends on which elements end up victorious. (I think some of them have even been variously classified in both Innocence and Experience at different points, but I'm not 100% certain on that.)