This may be due to negative emotions associated with the prior feeding experience, like pain, stress, and unpleasantness. The good thing is that this condition is curable. So without further ado, let's get into the topic of feeding aversion.
Baby's Behavior While Experiencing Feeding Aversion

A baby going through a feeding aversion may display these behavioral signs:
1) Drinking less milk than scheduled,
2) Takes in milk or eats food in small portions unwillingly when starving,
3) Tries to prevent eye contact during feeding,
4) Shuts his mouth and swerves away from the bottle or breast,
5) Tries to avoid being fed with all his strength,
6) Only feeds when he is sleepy or exhausted,
7) Tries to get away when held in arms for feeding or even when held in arms in a feeding position with no particular intent for feeding,
8) Cries and shouts when he sees the bottle or food or when placed into a feeding position,
Generally, babies don't show clear behaviors associated with feeding aversion before 6 to 8 weeks after being born.
However, his physical potential and awareness of outright refuting the feed are heightened as he grows.
In addition, if the baby notices that the caregiver or parent is responding instantly to his subtle aversion cues (like turning his head away from feeding, crying when seeing the bottle, etc), then he learns that subtle aversion cues get the desired result.
On the flip side, if the caregiver or parents ignore his subtle aversion cues and attempt to feed him with diligence, the baby would become visibly upset. This is when the baby starts associating negative feelings with the feeding experience, developing a feeding aversion.

Now, the baby will show discernible feeding aversion cues (like crying when held in a feeding position, moving away from the bottle or breast, and screaming when the caregiver insists he feeds).
Reasons For Feeding Aversion
Some common reasons for feeding aversion are:
1) Stress linked with the previous gagging or suffocating occurrence whilst feeding
2) pain due to gulping or consuming food or milk on a swollen esophagus due to milk allergy or some other health conditions
3) stress due to persistence in feeding contrary to their liking
4) babies who have little experience with oral feeding due to tubes attached prior
5) Babies who have neurological disorders (eg. cerebral palsy and others), which explain delayed initiation of feeding.
Other uncommon reasons include mouth ulcers and a sensory processing disorder(SPD).
Identifying A Feeding Aversion
In the early stages of babyhood, one of the warning signs is the child's incapability of displaying oral feeding behavior by putting things in their mouths, such as toys, teething playthings, fingers, keys, and things alike.
So in case the child is not displaying oral feeding behavior since his early months, there might be a bigger problem to address regarding his feeding behavior in the future.
Age In Which Babies Experience Feeding Aversion
While most food aversion cases are of age groups of babies aged 7 months to a year, these aversions usually arise in the early phases of infancy. Feed-averse babies have inconveniences in changing from formula or simple baby foods to more textured foods as they evolve.
Treatment For Food Aversion

Occupational therapy can assist parents and caregivers in recognizing how they can improve their feeding capabilities in a more favorable and nurturing setting, with the expectation of decreasing the likelihood of feeding aversion.
In occupational therapy, an OT specialist will observe medical records, cognitive processes, responses, etc.
One time the underlying cause of the feeding aversion is determined, the specialist will devise a program for the baby's or child's condition. The period of the therapy depends on the availability and commitment to the program by the OT specialist, child, and caregivers.
You only require a diagnosis and prescription from a medic before having an appointment with the OT specialist.
FAQs
1) How does a feed-averse baby react to feeding during sleep or drowsiness?
As babies grow older, they mature and can refuse to feed when asleep. This is normal and not necessarily a physical cue for feeding aversion.
On second thought, if a feeding-averse baby realizes that he is being fed, then he will become fussy and cry and wake up from sleep because of resistance to being fed without his liking.
2) Why does my baby feel pressured during feedings?
He might feel tense or pressured if you force the bottle or food into his mouth.
This might be how we have seen babies getting fed in our surroundings, but these are also the feeding behaviors that eventually lead to feeding aversion. So you can learn about feeding behaviors that don't feel pressured or threatening to the feed-averse baby.
Conclusion
It certainly would be disappointing for the well-intentioned parents that their goodwill to feed their baby while he's visibly hungry has caused a feeding aversion. However, you should try to focus on finding a solution to this problem by learning about the topic or getting medical help if the feeding aversion continues.