This is a quotation form The Pleasures of Hope by the Scottish poet, Thomas Campbell:
‘Tis distance lends enchantment to the view,
And robes the mountain in its azure hue.
When we get closer to it we may find only ugly rocks, and the mountain no longer enchants us. This is a commentary on life. As another proverb reminds us, Expectation is better than realization. In the poem Hymen John Cunningham wrote
So various is the human mind;
Such are the frailties of mankind!
What at a distance charmed our eyes,
Upon attainment, droops, and dies.
And if distance lends enchantment, Familiarity breeds contempt.