"All that glitters is not gold" is a common traditional maxim. It probably has lots of sources of origin, some perhaps altogether independent of one another. We see it in William Shakespeare's play The Merchant of Venice, which uses "glisters" instead of "glitters."
All that glisters is not gold;
Often have you heard that told:
Many a man his life hath sold
But my outside to behold:
Gilded tombs do worms enfold.
Had you been as wise as bold,
Young in limbs, in judgement old
Your answer had not been inscroll'd
Fare you well, your suit is cold.