This poem seems to have two meanings here, a literal one and a metaphorical one.
Let's look at the last eight lines:
We are greater than the Peoples or the Kings—
Be humble, as you crawl beneath our rods!-
Our touch can alter all created things,
We are everything on earth—except The Gods!
Though our smoke may hide the Heavens from your eyes,
It will vanish and the stars will shine again,
Because, for all our power and weight and size,
We are nothing more than children of your brain!
"The Gods" is mentioned in the line before "the Heavens". I think that this and the capitalization should be taken as a hint that "the Heavens" should be read as a metonym for God.
So, read literally, it means that the smoke hides the sky. Metaphorically, it means that machines make people forget about God. (I don't want to go into detail about exactly how they would do that, because there are lots of possibilities, for instance people starting to "worship" machines instead of God, and it's not clear to me which one Kipling was thinking about, if indeed he had one in particular in mind.)