Move the spot you and your pup are standing on half the distance to the gap and repeat the training.
Be sure to use lots of treats and praise when he gets it right.
Keep repeating this training until your dog no longer growls at the dogs walking by him.
Take the training out on the street by taking your pup for a walk.