Often it's how the situation got there in the first place. For example, in one suburb in my city a few landlords who owned apartments started renting to "undesirables" - illegal aliens, prostitutes and known drug dealers. This brought all kinds of problems because the area became known as a "safe haven" for petty criminals.
This drove down the market values of all the properties in the area, which is of course what these landlords wanted. After people started moving out they started purchasing properties and land all over the area and when they were comfortable enough with what they had, they enlisted the help of the police to evict the undesirables (and thereafter push up rent). With more properties under their belt, they had more say in the rate payers association, which meant they had more power to vote on things that worked in their favour rather than the original residents. I'm sure you can see where things went from there.
The other side of things is also what gentrification usually implies - destruction of communities. But let's leave that for another discussion...