The basic meaning of the 4-character idiom 森羅万象【しんらばんしょう】, sometimes also しんらばんぞう, しんらまんしょう, or しんらまんぞう, is
all things in the universe.
Let us examine 森羅 and 万象 separately.
森 refers to a forest or many trees. 羅【ら】, as in the word 羅列【られつ】, means 網【あみ】
net and in extension also 連【つら】なる
be in a line. The compound 森羅 derives from the idea of a great many trees growing next to each other. It means 'many things in a line', and from this, it developed the sense relevant here:
all things in heaven and on earth.
万 means ten-thousand, in this case a metaphor for "a lot" or "all". This metaphor can be observed in the words 万屋【よろずや】
general store or 八百万【やおよろず】の神【かみ】
the multitude of Shintou deities as well. 象【しょう】 should be understood similarly as in 象【かたど】る or 現象【げんしょう】, here it means
shape. Thus, 万象 refers to
a great many shapes and forms.
Other than the picturesque metaphor explained above, there is no particular story connected with the origin of this idiom. However, today is is used especially in the context of the Yin and Yang philosophy and the 易経【えききょう】, an old (approx. 2-3 millenia ago) Chinese text about a form of fortune-telling with bamboo sticks. It is based upon the idea and philosophy of Yin and Yang, and how they influence or cause the change of all things in the universe (=森羅万象).
Several pages suggest that this idiom had already been used in this context in ancient China, however, I cannot find any occurences of either 森羅 or 萬象 in the original Chinese text of the 易經., nor do I get any hits for 森羅萬象 when I expand the search to all texts classified as "Pre-Qin and Han" on ctext.org.