Here, the formula for gravity is,
g=GM/R^2
so, to change gravity, either we have to change mass(M) or radius(R) of the planet.
similarly, the formula for electrical force is,
F= kq1q2 / r^2
and to change the electrical force, either we have to change the magnitude of charge(q) or the distance between the two charges(r).