I have to disagree with you, k2dave. Mars does indeed have enough gravity to prevent water vapor from escaping. Or at the very least, it wouldn’t escape very quickly and it is still abundant in the Martian atmosphere (even the Hubble telescope can see ice-fog clouds on Mars).
ready29003, it’s thought that Mars’s water didn’t “go” anywhere; it didn’t leave the planet, anyway. A lot of it is underground in permafrost, some is under the icecaps (mostly at the North Pole), and some is thought to be in subterranean aquifers. Just how much is there is yet to be determined.
Mars’s current atmosphere is too cold and too arid to allow liquid water to exist on the surface. That’s what scientists mean when they say the water is “gone.”
As for how the water got there, and its abundance relative to Earth: we’re not sure where Earth’s water came from. There is some speculation that much of it might have come to Earth as comets.
Comets are made of water ice, and in the early days of the solar system comets and other objects rained down on the planets with great frequency.
Mars, being much less massive than Earth, wouldn’t have attracted as many comets. Whether it still would have gotten as much, “proportionally,” I couldn’t say.