A few days of eating less is not dangerous. For a well-nourished baby over 6 months, skipping some solid food meals during teething is not a medical concern. Breast milk and formula provide complete nutrition. The calories will be made up.
Hydration matters more than food. The primary concern during any period of reduced intake is hydration, not calories. As long as your baby is taking breast milk, formula, or water (6+ months) and producing adequate wet diapers, they are fine.
Do not attribute prolonged food refusal to teething. If your baby has refused food for more than 3 to 5 days and no tooth has erupted, look for other causes: illness, oral thrush, food sensory issues, or digestive discomfort.
This is not the time to introduce new foods. During active teething, stick with familiar, well-tolerated foods. A baby with sore gums who is also being offered an unfamiliar flavor or texture is more likely to refuse. Save new food introductions for when your baby is comfortable.