There's rent control, Proposition 13, and fixed rate mortgages. Those greatly help long time homeowner.
Homeowners lock in low interest rates and fixed monthly payments. If inflation hits you're still paying the same. Possibly 1/5th the amount that your neighbor might be paying if you've had your house for a while.
With Proposition 13 your property tax won't go up more than 2% despite double digital home price inflation year after year in the bay area.
The amount of equity generated each year is often more than peoples' entire salaries.
West Oakland, for example, wasn't wealthy, but was nevertheless a thriving black neighborhood. People, money, music, culture from all over the country flowed in via the rail system and the Port of Oakland. It was vital in America's Jazz scene, dubbed "Harlem of the West."
The postwar period saw West Oakland fragmented and paved over by the Cypress freeway and the 980, construction of the behemoth USPS facility, construction of the BART straight through 7th street. Pretty clear cut case of environmental racism. American city officials in the 40s and 50s had no problem stating their motives out loud -- they saw construction of these projects in thriving black neighborhoods as a win-win: build up infrastructure and get rid of the "local niggertown.[1]"
We can't simply chalk these changes up to inevitable economic downturn. West Oakland is an extreme example, but these changes are guided by policy decisions as much as economic change.
What you typically see is long-time neighborhood residents being displaced by wealthier newcomers. In a poor neighborhood, this means that people who are already vulnerable, especially those that are renting also have to cope with a whole new set of problems -- landlords who desperately want to evict them, cost-of-living increases, increased pressure from law enforcement.
The Bay doesn't have resources for people who find themselves in this position. My old housemate in west Oakland, in her early 30s and well-educated, but with health issues, is being forced from the bay. She grew up in Berkeley and Oakland. This is her home. I'm sad.