The Tenderloin is known as the most dangerous spot in SF, though really, most anywhere south of market is fairly dangerous. The Tenerloin has a high number of homeless people and a bit of drug culture. It is even somewhat dangerous during the day. I think I read somewhere that about one of ten murders in SF happen in the Tenderloin. It's pretty bad. Though there are some great dive bars there.
It's getting better, but I would have to agree that the Tenderloin is a far ways away from even being a gritty, hipster place. It's pretty depressing even during the day. I would not only not live there, I wouldn't really hang out there if I could at all help it.
I've been through this area a few times (while visiting San Fran) and to be honest ... it's freaky .. in a bad and scary way.
Some mates of mine have a funny game we've created (but are too scared to play) => the Tenderloin Dash. Go there at night. Look for Zombie Alley (not sure of the real street name, but it's the one with the all junkie-lookin' people that look like the dead-walking) and run through there as fast as you can. If you survive - u win. The name came because those 2 mates accidently stumbled across this neighbourhood at night and thought they were going to die when they were walking through Zombie Alley.
So yeah -> very scary place.