Poor mom, poor daughter. You are so right that making food a battle is counterproductive. Can you eat when you're upset? Me neither.
Lots of parents report that their children "refuse to eat." It's a completely normal stage, and by itself is usually pretty harmless (though less than ideal from a nutritional point of view), and in spite of their parents' deep anxiety, their kids aren't wasting away. In fact, many of the same parents mention that their kids are in the normal weight range. They are just very, very particular about what they would choose if left to their own devices. It's so common that some development experts think it may be a way for kids not to poison themselves by sampling every plant and bug that they can get their little fingers on.
Understandably, parents get anxious about their children not eating enough, which often leads to mealtime battles, which in turn can lead to long-term food issues, up to and including serious eating disorders. An unfortunate few toddlers are cursed with eating problems that do call for medical intervention, often associated with sensory integration issues. Have you considered, with the gagging, that this could be a problem for your daughter? Kids this age can be genuinely disgusted by certain flavors and textures, and that reluctance to try various foods can last for several months to a few years. Imagine a hostess offering you grasshoppers and sheep's eyeballs at a dinner party (gasp, choke, gag…). And then force-feeding you or putting you in time out.
My 4yo grandson isn't much of a mealtime eater, and usually has only the scantiest appetite by the end of the day. Dinners are often his smallest meal, and he doesn't suffer from hunger through the night. He's never been much of a self-feeder, but if he's engaged in interesting conversation or a silly game, or even watching the occasional video directly "after" dinner, he'll sometimes accept bites of food from his parents, which they offer because he's on the skinny side. During the day, he is usually willing to "graze" on high-quality snacks, overall quite a healthy diet, actually. His preferences can shift quite a bit from month to month, and are most likely signaling that his body needs more of certain nutrients. We've also noticed that if he doesn't get to eat right when he feels hungry, the feeling will often pass and he'll have absolutely no appetite when dinner is ready 25 minutes later.
Many kids are much better grazers than mealtime eaters, and that's actually a fairly healthy and natural way to eat. They can grab a few attractive/nourishing bites right when they are feeling hunger. You might consider trying that, along with having her sit with you for a SHORT period at meals to maintain a pleasant family bond.
It's completely normal for kids' appetites to disappear completely for days at a time, and for them not to be hungry for certain meals. Making kids eat foods they dislike, aka force-feeding, makes for an unpleasant mealtime experience, which further kills appetite. It also teaches some of us to eat when we're not hungry, which can become a very unhealthy habit later on.
I hope you'll keep empty calories out of the house. Have you tried smoothies made with Silken tofu (very smooth), or bland puddings made with soy milk and egg for protein? Egg white is a complete protein, if her allergies don't include egg, so soft omelets may work (and you can experimentally add tiny amounts of pureed veggies). Quinoa is another pleasant, bland, soft grain that cooks like rice and has a very high complete protein profile.
Good luck. I hope you'll investigate the possibility of sensory issues. Your pediatrician can guide you to professionals who can help you cope.