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 is from 1857. 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, 1802]
Luck of the draw (1967) 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.