PORTLAND, Ore. — John D. Gray, 92, got wind about three years ago, near the bottom of the Great Recession, that Habitat for Humanity was doing something pretty interesting here in Oregon’s largest city. In a depressed real estate market, Habitat, the nonprofit housing group, was betting big: trying to buy vacant land on the cheap, shopping from banks in repossession and foreclosure sales to squirrel away for housing projects years in the future.

Mr. Gray knows a thing or two about business cycles and buying opportunities. He made his fortune after World War II selling chain-saw equipment for a once-burly timber industry in the Pacific Northwest, riding the crest of America’s first real housing boom. So he called a friend, who set up a meeting with Habitat’s local chief executive in east Portland. “Would $1 million in cash help out in the effort?” Mr. Gray asked.

His philanthropy in turn opened doors with other donors, including a lumber company heir who had never given to Habitat, but who was inspired by Mr. Gray’s example to chip in $250,000. Mr. Gray then upped the ante again, adding another $1 million to the statewide Habitat for Humanity office.