both ve similar equations
both are energies of one object w.r.t another
differences- electric pe is due to electrostatic force and gravitational pe is due to gravitational force
electric pe is > than gravitational pe since electrostatic force> gravitational force
electron bound in an atom ll ve largest potential enegy in its ground state. i think hope it helps