The ratio was known to the Ancient Greeks. Euclid calls it the "extreme and mean ratio" (see Book VI,Definition 3).
"A straight line is said to have been cut in extreme and mean ratio when, as the whole line [AB] is to the greater segment [AC], so is the greater [AC] to the less [CB]."
In other words, the golden ratio (φ) is defined such that: φ = (a/b) = (a + b)/a.
Euclid proceeds to show how the golden ratio can be constructed geometrically (Book VI, Proposition 30):
Euclid also how this golden ratio can be used to construct a regular pentagon in Book IV, Proposition 11 (see here).
The popularity of the golden ratio in art can perhaps be traced to Luca Pacioli's Divina Proportione which was written in 1509. During the Renaissance, artists and architects made great efforts to capture this ratio in artworks and building designs.
The constant is said to be named φ after the sculptor Phidias.
Using the definition a/b = (a+b)/a, we can show that φ = (1 + √5)/2.
Indeed, if φ = a/b, then a = bφ and:
bφ/b = (bφ + b)/(bφ) = b(φ + 1)/(bφ)
which simplies to:
φ = (φ + 1)/φ
φ2 = φ + 1
φ2 - φ - 1 = 0
Then, using the quadratic equation, we get:
φ = √1 ± 4/2
Then, the only positive solution is: (1 + √5)/2.