I believe you are looking for step-and-slide movement. It is mentioned as the reciprocal dance of two opposing pedestrians.
The term is coined by Wolff, M. in 1973 (Notes On The Behaviour Of Pedestrians, In: Peoples In Places: The Sociology Of The Familiar, pp 35-48, New York, Praeger.) and the behavior is studied by the sociologist Goffman also.
Goffman notes that sometimes the signs become confused, resulting in two opposing pedestrians coming into some sort of "reciprocal dance". Wolff (1973) is the first to describe the so-called step-and-slide movement.
This movement mostly occurs between members of equal gender and conveys that interacting pedestrians do not take a total detour or attempt to avoid physical contact at all cost. Neither of the pedestrians will move enough to guarantee contact avoidance or bumping into each other, unless the other pedestrian cooperates.
"Street Vending and the Use of Public Spaces in New York City" By Patricia Voltolini
The below excerpt explains the phenomenon from the viewpoint of cognitive science and the article calls this movement pedestrian jig1 also.
...cognitive scientist Alexandra Horowitz examines the special skill of the urban pedestrian: a deft and intuitive maneuver known as the “step-and-slide,” which turns out to be the secret to urban swarm management.
Horowitz breaks down this necessarily mundane yet infinitely curious move, which researchers identified after innumerable hours of watching people walk past one another in the street:
"If sidewalk traffic is dense and collision seems imminent, we pull this two-step pedestrian-dance move. While striding forward, the walker turns ever-so-slightly to the side, leading with his shoulder instead of his nose to turn the step into a side-step. We twist our torsos, pull in our bellies, and generally avoid all but the mildest brushes of other people (and if we do brush against someone else, we keep our hands close to our body and our faces turned away from one another."
"How to Do the “Step-and-Slide”: The Rules of Avoidance, Alignment, and Attraction for Deft Urban Walking" by Maria Popova / brainpickings.org
1 The Jig (Irish: port) is a form of lively folk dance in compound meter, as well as the accompanying dance tune. Wikipedia