Similarities Between Electric and Gravitational Fields
Electric and gravitational fields have a lot in common. The expressions for the forces and fields point sources take the same form, obeying inverse square laws. Expressions for the potentials due to point charges also take the same form, both proportional to
These symmetries are illustrated in the following table.
Electrostatics  Gravitational 
Coulomb's law for the force between point charges  Newton's Law of Gravitation for the force between spherically symmetrical masses 
Electric field due to point charge  Gravitational field due to spherically symmetrical mass(1) 
Electric potential due to point charge  Gravitational potential due to a spherically symmetrical mass 
There are important differences

the force of gravity is much weaker than the electric force. For example, the electric force between the electron and proton in a hydrogen atom is of the order oftimes the force of gravity.

the force of gravity is always attractive – the is only positive mass, but there are positive and negative electric forces, so the electric force can be repulsive (between like charges) or attractive (between opposite charges). This means that gravity can be the dominant force over large distance. Electric charges tend to cancel each other out, so over large distances the electric force is close to zero.

inside a charged conductor, the electric field is zero, but inside a spherically symmetric mass (note the wording in the table above), the gravitational field will not be zero, but will take the form of (1), whereis the mass inside the radius