Season of the Witch: Enchantment, Terror, and Deliverance in the City of Love is a history book by best-selling author David Talbot. The book captures the dark history of San Francisco from the 1960s to the early 1980s utilizing a “kaleidoscopic narrative”  and tells the story of how "the 1967 Summer of Love gave way to 20 or so winters of discontent." 
Cool, Gray City of Love brings together an exuberant combination of personal insight, deeply researched history, in-depth reporting, and lyrical prose to create an unparalleled portrait of San Francisco. Each of its 49 chapters explores a specific site or intersection in the city, from the mighty Golden
If you want to do some reading, I have a few recommendations:
FoundSF and their links page
Outside Lands — focuses on the western neighborhoods
Cool Gray City of Love by Gary Kamiya
The Barbary Coast: An Informal History of the San Francisco Underworld by Herbert Asbury
City for Sale: The Transformation of San Francisco by Chester Hartman — fairly dry political history, but it provides a lot of valuable context for the ongoing fights over housing and development.