“If you’re going to San Francisco, be sure to wear some flowers in your hair”

“Summer of Love” and counterculture movement.[edit]
See also: Counterculture of the 1960s, History of the hippie movement and San Francisco in the 1970s
Following World War II, San Francisco became a magnet for America’s counterculture. During the 1950s, City Lights Bookstore in the North Beach neighborhood was an important publisher of Beat Generation literature. Some of the story of the evolving arts scene of the 1950s is told in the article San Francisco Renaissance. During the latter half of the following decade, the 1960s, San Francisco was the center of hippie and other alternative culture.

In 1967, thousands of young people entered the Haight-Ashbury district during what became known as the Summer of Love. The San Francisco Sound emerged as an influential force in rock music, with such acts as Jefferson Airplane and the Grateful Dead achieving international prominence. These groups blurred the boundaries between folk, rock and jazz traditions and further developed rock’s lyrical content.

Rise of the “Gay Mecca”[edit]

Rioters outside San Francisco City Hall the evening of May 21, 1979, reacting to the voluntary manslaughter verdict for Dan White, that ensured White would serve only five years for the double murders of Harvey Milk and George Moscone.
San Francisco’s frontier spirit and wild and ribald character started its reputation as a gay mecca in the first half of the 20th century. World War II saw a jump in the gay population when the US military actively sought out and dishonorably discharged homosexuals. From 1941 to 1945, more than 9,000 gay servicemen and women were discharged, and many were processed out in San Francisco.[33] The late 1960s also brought in a new wave of lesbians and gays who were more radical and less mainstream and who had flocked to San Francisco not only for its gay-friendly reputation, but for its reputation as a radical, left-wing center. These new residents were the prime movers of Gay Liberation and often lived communally, buying decrepit Victorians in the Haight and fixing them up. When drugs and violence began to become a serious problem in the Haight, many lesbians and gays simply moved “over the hill” to the Castro replacing Irish-Americans who had moved to the more affluent and culturally homogeneous suburbs. The Castro became known as a Gay Mecca, and its gay population swelled as significant numbers of gay people moved to San Francisco in the 1970s and 1980s. The growth of the gay population caused tensions with some of the established ethnic groups in the southern part of the city. On November 27, 1978 Dan White, a former member of the Board of Supervisors and former police officer, assassinated the city’s mayor George Moscone and San Francisco’s first openly gay elected official, Supervisor Harvey Milk. The murders and the subsequent trial were marked both by candlelight vigils and riots within the gay community. In the 1980s, the HIV (formerly called LAV, HTLV-III, also known as AIDS virus) created havoc on the gay male community. Today, the gay, lesbian, bisexual, and transgender populations of the city are estimated to be approximately 15%, and they remain influential in the city’s life.

Wikipedia