(CNN) -- He is now rich several times over, but Christopher Gardner once walked San Francisco's streets homeless, pushing his toddler son and their belongings in a stroller.
It wasn't that Gardner didn't have a job. He did; in 1982, he was in a stockbroker trainee program, with a $1,000 a month stipend. But he also was a single father trying to pay for diapers, day care and food for two. And the rooming house where he was living when his girlfriend brought him his young son, well, it didn't let kids stay there.
As he once said, he was homeless, but not hopeless.
More than two decades later, at age 52, Gardner has houses in two cities. He owns a major brokerage firm. He has owned fancy cars and wears custom-tailored suits. His rags-to-riches story is so steeped in the American Dream that it forged a best-selling book, "The Pursuit of Happyness." And now the story is told in a film of the same name, starring Will Smith and featuring Smith's son, Jaden. The movie premieres in theaters this weekend. (Watch the movie trailer)
It's a story made-for-Hollywood but at the time he was on the streets, Gardner struggled as he moved from place to place at night while trying to become the one trainee out of 20 to be offered a full-time position with Dean Witter Reynolds during the day.
"You could go to work and totally throw yourself into what you're doing ... be in another space and time, and then, guess what, the markets close. Where you going to sleep tonight?" Gardner, 52, told CNN in a phone interview.
"That transition, having to make that every day; leaving mainstream of capitalism to the fringes of survival, I would say that was difficult."
Gardner and Christopher Jr. -- his girlfriend had left him after he spent 10 days in jail -- slept sometimes in shelters, sometimes in parks, or in the Dean Witter offices, where they would stretch out beneath the desks and wake up before anyone else arrived. They ate in soup kitchens, and occasionally lived out of public bathrooms in San Francisco's mass transit system. After a year on the streets, Gardner got the full-time stockbroker spot and had money saved to get an apartment.
Since then Gardner, who never went to college and who grew up with an abusive stepfather, has hoisted himself to very nearly the top of income brackets, becoming a millionaire several times over.
"I'm blessed. I mean, come on, I found something I absolutely love. I'm one of the best, and I work for myself. It ain't going to get no better than that," he said.
More important than the money, he said, are his son, now 25, and his daughter, Jacintha, 21. He's also proud of his philanthropic work. He helped fund a $50 million project in San Francisco that created low-income housing and opportunities for employment in the area of the city where he once was homeless.
Lately, he's been working on a project in South Africa that, because of security laws, he could not describe.
"I can say that next to raising my children it's the most important thing I'll ever do in my life," he said.
Gardner said he has been told the project cannot be accomplished; after all, people who are "bigger than you and smarter than you" haven't done it.
"Well, you know what, because they didn't have some of the experiences that I've had in my life, maybe they don't care enough to try," he said. "It's not important to them."
Gardner has never, it seems, reacted well to being told what he can and cannot do. A speaker once did just that -- saying people's backgrounds determined who and what they would be.
Gardner followed and felt he had to rebut, calling the theory baloney and talking about his own life story.
"So many came up to me afterward and said, 'You know what? Thank you for saying that. Because just like you, I'm from that house, I'm from that neighborhood, I'm from that family, and just like you, I chose to go the other way.' "
The last person to thank him on that day, he said, was James Earl Jones. "[When] Darth Vader says it's bullshit, it's bullshit," he said.
And he realized then he should write the book.
People connect with it, he said, because they see themselves in the pages but also realize that there are others who face the same issues.
"When I talk about the alcoholism in the household, domestic violence, child abuse, illiteracy, and all of those issues -- those are universal issues; those are not just confined to ZIP codes," he said.