The phrase “Injustice anywhere is a threat to justice everywhere” has been attributed to Martin Luther King's famous civil rights document “Letter from a Birmingham Jail.” King was writing to a group of Birmingham clergymen who had published a letter in a newspaper criticizing his decision to defy the law and hold a civil rights demonstration in Birmingham.
King's intent was to draw attention to the fact that if the government is permitted to discriminate, particularly through segregation, in one place, they are likely to be permitted to do it in others. If African-Americans were to simply accept segregation as it was forced upon them, no change for the better would be possible. Therefore, nonviolent protest, even in defiance of established law, was necessary to fight injustice.
In this sense, the phrase is correct. Allowing segregation, or any other injustice, to stand in one place establishes a precedent that can be repeated anywhere else. Precedent, aside from existing as a legal justification, is also frequently used to justify acts by other governmental entities (cities, counties, states) and even private parties (such as business owners).
By protesting segregation in Birmingham, King and his demonstrators helped set a new precedent that fought injustice. This precedent was part of chain of events that helped change American ideas about race-related values. As we have seen from recent events, this process is still not perfect.