The association of the number seven with luck is likely a connection to its ancient Hebrew association with perfection. There are many Biblical references to the number seven.
In Judaism, the number seven is associated with creationism. The earth was created in seven days. Building from that, a week contains seven days. There are seven days of Passover. The Jewish people also sit Shiva for seven days. The number seven corresponds to Moses's birthday. There are seven holidays in the Jewish year. In some sectors of the Jewish religion, the number seven is a reflection of completion. Members of the Judaic faith have a superstition about the fact that the first verse of the Torah contains seven words. In short, in the Jewish tradition, the number seven has a very sacred standing and is an indication of being without flaw. This acceptance as the number as divinely blessed is likely what led to the interpretation of it as a lucky number. Some associate the number seven with infinity. It is the number that cannot be defined because when God accomplishes seven of something, he creates seven more. Thus, seven times seven is a euphemism for eternity, or without limitation, or the total possible outcome.