It is sap coagulating into the gel due to some kind of wound or disease that has damaged the bark of the tree. More here: http://www.missouribotanicalgarden.org/gardens-gardening/your-garden/help-for-the-home-gardener/advice-tips-resources/pests-and-problems/diseases/cankers/gummosis-of-fruit-trees.aspx