c. 1500, "fortune good or bad, what happens to one by chance (conceived as being favorable or not); good luck, quality of having a tendency to receive desired or beneficial outcomes," not found in Old English, probably from early Middle Dutch luc, shortening of gheluc "happiness, good fortune," a word of unknown origin. It has cognates in Modern Dutch geluk, Middle High German g(e)lücke, German Glück "fortune, good luck."
Perhaps first borrowed in English as a gambling term. To be down on (one's) luck is from 1832; to be in luck is from 1857; to push (one's) luck is from 1911. Good luck as a salutation to one setting off to do something is from 1805. Expression no such luck, expressing disappointment that something did not or will not happen, is by 1835. Better luck next time as an expression of encouragement in the face of disappointment is from 1858, but the expression itself is older:
A gentleman was lately walking through St Giles's, where a levelling citizen attempting to pick his pocket of a handkerchief, which the gentleman caught in time, and secured, observing to the fellow, that he had missed his aim, the latter, with perfect sang-froid, answered, "better luck next time master." [Monthly Mirror, London, September 1802]
Luck of the draw (1892) is from card-playing. In expressions often ironical, as in just (my) luck (1909). To be out of luck is from 1789; to have one's luck run out is from 1966.
by 1945, from luck (n.). To luck out "succeed through luck" is American English colloquial, attested by 1946; to luck into (something good) is from 1944. Lukken (mid-15c.) was a verb in Middle English meaning "to happen, chance;" also "happen fortunately" (from the noun or from Middle Dutch lucken), but the modern word probably is a new formation.