The Tenderloin neighborhood in San Francisco is an exceptionally skeevy slum that often catches travelers by surprise, because it lies just a few blocks from the posh Union Square district. When I lived downtown, I routinely stopped tourists who were about to blunder into the neighborhood and turned them around.
For the convenience of a friend, I've created a little map showing Where Not To Go. The areas marked in yellow are often scruffy but not scary, though I'd recommend staying out of them at night. The areas marked in red are places to avoid, period.