There is a huge difference between intermolecular forces and gravitational forces. The intermolecular forces are those that exist within molecules of atoms. These forces are happened to be electric by nature. This is because they arise due to the attraction between electrons of one atom/molecule with the protons of another atom/molecule.
Gravitational forces on the other hand, happen to arise due to the existence of mass. If the intermolecular forces were due to gravity, each particle would then attract the other particle with a force that is proportional to their mass. However, this is not what we observe through experiment which allows us to conclude that intermolecular forces are different than gravitational forces.