Our greatest glory is, not in never falling, but in rising every time we fall.
Oliver Goldsmith (1730-1774) Irish poet, playwright, novelist
The Citizen of the World: or, Letters from a Chinese Philosopher, Residing in London, to His Friends in the East, Letter 7 (1762)
(Source)
Ostensibly from a Chinese visitor to London, Lien Chi Altangi, the letters were written by Goldsmith and published in The Public Ledger in 1760-61. Letter 22 has the similar "True magnanimity consists not in NEVER falling, but in RISING every time we fall."
The saying is often attributed to Confucius (Letter 7's introduction implied that they were), but is not found in Confucius' work. The saying is also sometimes attributed to Ralph Waldo Emerson. See here for more discussion.