Pending approval by the city, installations could start in November and be done by April 2014, San Francisco officials said.
Google said the gift is designed to empower citizens and community groups, and serve as a pilot for eventual citywide free WiFi, TechCrunch reported Wednesday.
Google's money will provide for equipment, installation and maintenance of the WiFi network for two years, after which it will be the city's responsibility to maintain it, San Francisco Mayor Ed Lee said.
"We are behind," Lee said in an announcement event in the city's Balboa Park. "I call us the innovation capital of the world but we need to catch up. This is where the relationship with the private sector is so important to us."
Google has paid for similar WiFi project in neighborhoods of New York and Boston.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Millions of Getty images now available for free via embed tool