Potential energy is the energy kept in an object as a result of its position, which includes GPE and EPE. GPE is the potential energy stored in an object as an outcome of its vertical position or height. GPE depends on mass and height.
There is a relationship between GPE and the mass of an object and also with the height. EPE is the energy stored as a reason for deformation (stretching or compressing). Mainly the difference between the GPE and the EPE is that the former is dependent on mass and height while the latter is involved with the deformation of the object.