When I only had one Yorkie, I used to pick her up before answering the door. After getting two, I couldn't do that anymore, so I put our ex-pen up around the front door, on the inside, to keep them at bay while I answer.  A baby gate would work okay but you'd have to be able to step over it, or get a swinging one.  I just move the ex-pen aside when someone has entered and the door has been shut, then put it back