It is how cherries, apricots, peaches, plums or citrus react to a wound, a fungus or bacterium, waterlogging or hard pruning. A little gum after a knock is not serious; if there is a lot, or it comes with dead bark, look for the cause.
In citrus, gummosis at the base of the trunk is usually caused by a soil fungus (Phytophthora) encouraged by watering against the trunk and waterlogging.

