Kennel cough is a highly contagious respiratory infection that can cause a harsh, goose-like cough followed by gagging in dogs. Other respiratory infections can also lead to gagging. It is essential to seek veterinary care to determine the appropriate treatment and prevent the spread of infection to other dogs.