Actually, you have to think of the invisible hand as a heuristic metaphor, such as Maxwell's demon or Schrodinger's cat.
I think it's a touch more superstitious than the above, although for the most part it is a metaphor. My impression is that Smith thought there was some sort of mysterious Divine providence that had ordered society in such a way that by seeking your own self-benefit, you unintentionally benefitted others.
More along the lines of, say, bees unintentionally pollinating fruit trees while collecting honey and pollen, thus helping out the fruit trees without meaning to do so. This actual metaphor (bees) was first used by Bernard Mandeville in 1714, in The Fable of the Bees: or Private Vices, Publick Benefits.
It was not unusual for Deists of the time to refer to Divine Providence as a sort of ordering principle for the world that wasn't actively involved in day to day pursuits, sort of along the lines of Natural Law.