Necessity is the mother of invention
Difficult situations inspire ingenious solutions.
The author of this proverbial saying isn't known. It is sometimes ascribed to Plato and it does appear in translations of Plato's Republic. Those translations weren't made until much later than the phrase was in common use in English and are more likely to be the work of the translator than being a literal version of Plato's words. The proverb was known in England by the 16th century, although at that point it must have been known to very few as it was then documented in its Latin form rather than in English. Many well-known proverbs appeared first in Latin and were transcribed into English by Erasmus and others, often as training texts for latin scholars.
William Horman, the headmaster of Winchester and Eton, included the Latin form 'Mater artium necessitas' in Vulgaria, a book of aphorisms for the boys of the schools to learn by heart, which he published in 1519.
Roger Ascham came close to an English version of the phrase in his manual on how to use a longbow, which is by the way the first book ever written about archery, Toxophilus, 1545:
"Necessitie, the inuentour of all goodnesse."
George Chapman also had a 'close but no cigar' moment with his tragic play The Conspiracy and Tragedy of Charles, Duke of Byron, 1608:
"The great Mother, Of all productions (grave Necessity)."
The earliest actual usage of 'necessity is the mother of invention' that I can find in print is in Richard Franck's 'Northern Memoirs, calculated for the meridian of Scotland'. Originals of this text are difficult to locate, but it was republished in 1821, with a foreword by Sir Walter Scott. The frontispiece of the reprint states that the original was "writ in the year 1658". It contains this:
Art imitates Nature, and Necessity is the Mother of Invention.
1658 seems the best date we have as the birth of the phrase in English.
Frank Zappa gave this phrase an extra lease of life when he chose the name of his inventive jazz/rock band in 1964 - The Mothers of Invention. His use of 'mothers' clearly had a ribald meaning that Erasmus wouldn't have approved of but Zappa did at least keep the expression from dropping into 'granny phrase' obscurity.
See other proverbs.