The dog barks out of fear and that usually makes people keep their distance. In this instance he didn't have time to bark and she was too close for his comfort so he took it a step further.
He's clearly uncomfortable with people invading his space. Easy (and responsible) solution is keep him away from people. If you for some reason have to bring your dog into a crowd of people then muzzle him.
Btw if this was my dog that did this I would correct him so hard people would think it's animal abuse