In the 18 years since Google was born in a garage, Mountain View has ridden a wave of unprecedented job growth. But alongside the boom has come a slew of other issues familiar across the Bay Area: soaring rents, snarled traffic and people living in vehicles because they can’t afford apartments.

Google is starting to address the crisis head-on. Its parent company, Alphabet, which employs more than 20,000 people in a city of 80,000, has proposed building 330 units of housing not far from its headquarters.

It’s the first time Google has filed paperwork with the city to build housing — and a sign of just how acute the problem has become for technology companies, which are generating jobs much faster than their communities are building homes.

“It’s kind of a new thing in our area,” Mountain View Mayor Pat Showalter said of Google’s project, which includes office space as well as housing. The Bay Area, she added, has “under-built for decades.”

Google’s plan, which the Mountain View City Council is likely to take up in 2017 or 2018, is part of a renewed push across Silicon Valley to address a problem that become one of the most serious threats to the tech industry’s growth. Facebook has also announced plans to develop 1,500 units of housing on its property in Menlo Park, and it is donating $20 million to a community partnership that would support affordable housing and providing tenants’ rights services to the community.

The new units address only fractions of the need.

“The fact that companies that design software and build algorithms for a living are having to build housing is really an indicator of the failure of our traditional housing supply model,” said Matt Regan, senior vice president of government relations for the Bay Area Council.

After years of foot-dragging, cities are also showing a change in attitude, as they take modest steps that will make it easier for developers to build more housing. In Palo Alto, city officials recently discussed whether to change a rule that limits the height of buildings to 50 feet. Last month, Menlo Park changed its zoning rules to allow for more dense housing in an area of the city. In Mountain View, which added 17,921 jobs between 2012 and 2015 while adding just 779 new housing units, the City Council voted last week to clear two projects to go through the city’s planning process: a few dozen condominiums and a 470-unit luxury apartment complex.

“Governments are starting to realize that they have to stand up and start approving more housing,” Regan said. But even with the new push, cities and companies are only building a small portion of what’s necessary, he said.

Google’s proposal would build 330 housing units on its property, in an area that once housed semiconductor companies using hazardous materials. It would prioritize housing for people working in the city and would not be limited to Google employees.

Partly because of zoning considerations, which need to be reconciled with the city’s growth plans, Mountain View’s City Council did not advance Google’s project even as it moved the condos and luxury apartments forward in the planning process. But the mayor and several council members seem supportive, and assuming Google remains keen, the project is likely to come before them again.

“If our goal is to reduce (traffic), it would make sense to prioritize housing for folks that are working in the area,” Ryan Trinidade, a project executive with Google, told the council Tuesday. Google’s proposal would fit well with the city’s goals, he said.

Facebook’s project, which is still in the early planning stages, would add 1,500 housing units on its Menlo Park property, even as the company expands its headquarters to accommodate more workers. Fifteen percent of the units would be designated as affordable housing — an issue that Facebook’s $20 million donation is also intended to address.

“If we’re able to develop housing to increase the supply in the market, I think it makes a substantive difference,” said Juan Salazar, Facebook’s public policy manager. “It’s small in terms of the size of the problem, (but) it helps to contribute to some of the solutions.”

Both Facebook and Google have also made contributions in the past to apartment projects in their communities.

Aaron Terrazas, senior economist for Zillow, likened the recent moves by Facebook and Google to when Henry Ford, founder of the Ford Motor Co., built houses for workers in Dearborn, Mich., in the 1900s. At the time, the city did not have enough housing and workers were traveling an hour to get to work, according to the Detroit News. In the Bay Area, some tech workers are cramming into small apartments with multiple roommates to shave off commuting time; others are living in their cars or choosing to leave the area entirely.

Alexander Brown, a 26-year-old Google software engineer from Arizona, said he was surprised to see how expensive apartments were in Mountain View when he looked for a place to live near work in 2013. So he ended up buying a mobile home.

“It seemed like a good investment, had a really short commute, and gave me control of my housing,” said Brown, who walks 15 minutes to get to the office. Brown declined to say how much he pays to rent space but said rents in general have climbed to $2,000 a month for new people coming into Santiago Villa, a mobile home community in Mountain View.

“I feel bad for people who aren’t in tech who live here, who were raised here and want to stay here but are being forced out or made to live in suboptimal conditions,” Brown said of the Bay Area’s housing crisis.

Bay Area cities have generally favored building new office space rather than residential units because they gain more tax revenue through commercial properties. Building homes also requires the cities to spend more money on services like fire, police and schools.

“I think that a lot of people enjoyed the suburban lifestyle that many of our communities have and they wanted to preserve that,” said Showalter, Mountain View’s mayor, who favors condo construction among other solutions. “They were fearful that densifying and providing more dense housing would really create problems for their communities. What’s important is that those communities are designed properly and we have the infrastructure that supports that dense design.”

“If you have all the parts to the puzzle, it works well,” she said. “If you get things out of balance, which really they are now, you have problems.”

A few cities are toying with a different philosophy: slowing demand for housing by trying to limit business growth. Earlier this year, Cupertino’s mayor mulled a controversial head-count tax on businesses with more than 100 employees. Last year, Palo Alto’s City Council passed a limit on the development of office space in certain parts of its city to no more than 50,000 square feet a year.

Palo Alto Mayor Patrick Burt said he believes the solution will come from increasing housing located near transit or walkable areas, investing in public transportation, and perhaps moderating the area’s job growth.

“Silicon Valley just doesn’t need to capture every tech job available,” Burt said. “The most healthy economy for the region long term is to moderate our rate of growth, not to have absolute boom and bust periods.”

Showalter said there are limits on what a city such as Mountain View can do in regard to housing. For example, it can approve projects, but it can’t specify the rents — though it can push for some affordable units.

“We can control whether they are designed well and built well. We really can bend over backwards to do that,” she said. “What they charge is a market question and government doesn’t control that. I can keep my fingers crossed that some of it the middle class could afford, but it’s not something that I have control over as a City Council person.”

Wendy Lee is a San Francisco Chronicle staff writer. Email: wlee@sfchronicle.com Twitter: @thewendylee