Only damage you have taken that you restore with food or water counts toward this achievement.
The damage need not be dealt by an enemy. Fall damage or damage taken by running out of breath underwater also counts.
HP restoration occurring over time can be stacked, if the player consumes all the food items of his choice at once without leaving his Pip-Boy. However, if they are healed completely by the instantaneous healing effects of the food items they consume, the achievement will cease tracking the rest of the consumed food towards this achievement.