The Castro is a neighborhood three miles from downtown that has been the center of the city’s gay life since the 1970s.