One of the better ways is to associate that person at the gate with a form of treat. So, when that person comes, he brings your dog's favorite food or toy. Your dog barks for attention or when he wants something? Ignore his barking and he will soon get frustrated and will stop.