Have you ever been visited by some Jehovah's Witness missionaries? After closing the door, if you peek out the window, you see them shake the dust from their feet as they get to the edge of your sidewalk. They do this because they're taking this verse literally and pronouncing judgment. In Jesus' day, when the Jews would accidentally or unavoidably walk across Gentile territory, once they got back to Jewish soil, they would shake their feet. Everyone knew they were shaking off the defilement of Gentile dirt. Thus, when the apostles shook the dust from their feet, people watching would know exactly what was happening.
They would know the apostles were sending this message: "You're lost, just like you think the Gentiles are lost. We come to you presenting the Good News, but if you reject it, you bring judgment upon yourselves."