Like charges repel and different charges attract, i.e. charges feel an electromagnetic (EM) force. Electrons (fundamental particles that 'orbit' around the nuclei of atoms) carry a negative charge of -1.610^-19 Coulombs (the unit of charge). This number, or why it's negative doesn't really matter. What does matter is that if you try to bring two electrons together, they will both feel a repulsive force. But if you, somehow, switched the charge of one electron (so that is becomes positive), the two electrons will now attract.
So how does this relate to gravity? Well, electrons have a mass, and they also have electric charge. But their mass (9.10938356 × 10^-31 kg) is not the same as their charge (-1.610^-19 C), and there really isn't any reason at all why these two numbers should be equal. Now think about gravity, this is also a force like the electromagnetic force. Just like charge was responsible for creating the EM force, gravitational charge is responsible for gravitational force - we call this is gravitational mass (but really think of it as charge). And again there is no reason why this gravitational mass should be equal to the objects inertial mass (rest mass is just a measure of how much stuff is in something). But it is. This is known as Einstein's Weak Equivalence principle, and without it, General Relativity would come tumbling down like a house of cards.