I generally consider myself a fairly lucky person. This article that describes the mechanism behind "luck" resonated with me.
Unlucky people miss chance opportunities because they are too focused on looking for something else. They go to parties intent on finding their perfect partner, and so miss opportunities to make good friends. They look through the newspaper determined to find certain job advertisements and, as a result, miss other types of jobs. Lucky people are more relaxed and open, and therefore see what is there, rather than just what they are looking for.
That's not saying you should live an undirected life. But it does suggest that one should be more open to new experiences rather than being single-mindedly focused on a particular path.
When I came to Stanford for graduate school, it was with the intent that I would get my degree in computer music, studying at CCRMA. I enjoyed both music and technology, and thought the combination of the two would be a perfect career for me. But that's not how it worked out.
The first semester there I realized that I had little in common with the people at CCRMA. There seemed to be two types: avant-garde musicians making what sounded to me more like random noise than music, and hard-core engineering types who were more fascinated with algorithms like fast Fourier transforms than what they allowed the musicians to accomplish.
When I realized this path wouldn't work out for me, I was pretty down. But then I took CS147: an introduction to human-computer interaction. And it just clicked with me. It made so much sense that software was only powerful if the average user could use it. This was something I had struggled with all my life with computer music interfaces, but I had never envisioned how it could be different.
And actually the decision to attend Stanford was another case of being open. I had already accepted at UC San Diego because it was a lot cheaper. My girlfriend at the time asked why I was making education decisions based on money. I should go to Stanford since it's the better school and worry about paying off the student loans later. She was right, so that's what I did. And I paid off my loans within 3 years of graduation.
I have lived a lucky life. For starters, I won the ovarian lottery. But I'm convinced much of the luck in my life comes from recognizing new opportunities that come along and embracing them.