We had just gotten our dog a new treat. Our barely walking 1 yr old waddles over near the dog trying to pet touch the dog. The dog growls, barks and snaps at her. My daughter didn't get bit but was instantly crying scared. I came right over, smacked, yelled at the dog took it's treat stood menacingly over the dog until it cowered. It has never happened again. He is really good with my daughter and let's her crawl over.
I know that this sounds kind of silly but many animals respond to that kind of reaction.
You are in a tough situation especially since the moment has passed. Good luck.
While I wouldn't want my kid to be in a dangerous preventable situation I would hesitate getting rid of a puppy if I felt it could learn. If the dog was older I may be more inclined to get rid of it...