The basic elements of the Earth are not the same as those in the Universe, so how can the Universe have the same gravity?
It was one of Newton's great ideas that the force that makes apples fall from trees is the same as that which causes the motion of the planets. This was quite revolutionary at the time. We believe that gravity is universal, and behaves the same everywhere. We've advanced in our understanding since Newton's time, but a basic principle is that all mass (or energy, as the two are equivalent) interacts gravitationally in the same way regardless of composition.
You are quite correct that the Universe does not share the same composition as the Earth. The most common element in the Universe is hydrogen, at about 74%. This is quite rare in the Earth (about 0.03%), although it is quite common at the surface, being a constituent of water (you are about 10% hydrogen). The second most common element in the Universe is helium, at about 24%. This is exceedingly rare on Earth, though we have managed to find enough to fill the occasional balloon (we're actually running out quite rapidly). The Earth is mostly iron (32%), oxygen (30%) and silicon (15%). However, what type of matter an object is does not influence gravity, the only thing that is important is the mass. The force on a 1 kg mass is the same whatever it is made of, and careful experimentation has verified that.