In sectioin 822 of the Will to Power (ed. Kauffman), Nietzsche's note from 1888 reads thus:
"For a philosopher to say, 'The good and the beautiful are one,' is infamy; if he goes on to add, 'also the true,' one ought to thrash him. Truth is ugly.
We possess art lest we perish from truth." (Will to Power; Section 822)
This note reflects a theme that preoccupied Nietzsche from his early writings on Art in The Birth of Tragedy all the way through later works such as The Gay Science and Beyond Good and Evil. Unlike many philosophers who are concerned with the conditions under which a statement might count as being true, Nietzsche asks why philosophers and subsequently theologians and scientists exhibit such a strong "Will to Truth"-- i.e. why they hold the value of the truth for its own sake to have a status overriding that of all other categories, especially those which are aesthetic and artistic in nature. He is not rejecting the importance of truth in philosophy, science or everyday life. Rather, he is noting that the "Intellectual Conscience" which posits honesty and the acquisition of the truth as the summa bonum, fails to grasp the power of that "untruth" we find in artworks, works of fiction, music etc. The cognitive (knowledge-seeking) and aesthetic perspectives often conflict, and it is far from clear that in each and every case the value of truth is greater (i.e. is more conducive to vitality and health) than the value of the aesthetic. The argument proceeds in 2 steps:
a) Artworks and aesthetic experience can be as vital to human well being as Truth (or more).
b) Living should be understood, in large part, as a work of art in progress. In GS 299, Nietzsche asks, " how can we make things beautiful, attractive, desirable for us when they are not?" He answers the question a few lines down stating that, "we want to be poets of our lives, first of all in the smallest, most everyday matters." (GS; 299) Elsewhere Nietzsche describes this mode of living as, "Giving character to one's self."
Again, in The Gay Science (section 107), under the heading "Our ultimate gratitude to art - Nietzsche writes,
"As an aesthetic experience, life is still bearable for us."
He is echoing his earlier Birth of Tragedy in which he wrote,
"It is only as an aesthetic phenomenon that existence and the world are eternally justified."
Translator, Walter Kauffman, suggests that Nietzsche is reminding the reader that it was in that earlier book that he first drew attention to the problematic relationship between science (as the quest for truth) and art (as the quest for beauty and deep aesthetic fulfillment). In The Gay Science, he elaborates on the theme first taken up in Birth of Tragedy, and counsels us to "discover the hero no less than the fool in our passion for knowledge; we must find pleasure in our folly or we cannot continue to find pleasure in our wisdom." In this passage he seems to strike a balance between the ideals of beauty (however much it may stray from true accounts of the world) and the truth (conceived as that which which is taken to be the case, i.e. factuality). For example, war and killing are, in truth not pleasurable for most, but even the the rage of Achilles is something that readers of Homer through the centuries have long understood as beautiful and life-enriching poetry.Even the purposeful lying of Odysseus charms Athena in Homer's Odyssey, though the "intellectual conscience" of modern philosophers and science cannot celebrate "trickery" and dishonesty as does Homer. Art has the power to enrich human experience, but very often it does so by providing us with fulfilling illusions. This is not "bad" but shows that the aesthetic perspective has great value despite its being at odds, in many cases, with the will to truth and putative facts associated with it.