My four-month old yorkie, Coco, is just a little crazy!

I have been training him to sit and stay since I got him at 8 weeks and he catches on real quick. My problem is everytime someone comes to our house he goes bonkers! He won't stop jumping on them and licking them. He seems to forget everything I have taught him.
My sister visited yesterday and I put him in the kitchen with the baby gate to try to teach him to settle down first before he said hi, and he crawled up and over the gate twice! Does anyone out there know how to train a dog patience and manners. It seems really hard to get him to settle down. He also get quite crazy when I take him out of the house. Any suggestions would be great. Thanks!