While the other answer here and the link provided by Jeremy give excellent explanations, I believe a bit more nuanced reasoning is required.
Although the theory of planet formation is currently still incomplete, it is generally accepted that planets form in a so-called proto-planetary disk as a part of stellar formation process. This is backed up by several observation of such disk and even by
directly observed planets in systems where remnants of the disk are still present (most notably Fomalhaut-b).
However, exactly how these planets form is still unclear. A popular theory is that these planets form in place and therefore keep the orientation and inclination of the disk. This beautifully explains the Solar System and specifically why all planets have roughly the same orbital inclination. But that's not surprising as the model was specifically designed to do just that! Yet the Solar System does not have to be the only possible type of planetary system, or even the most common for that matter. Indeed the study of exoplanets has confirmed that very different planetary systems are possible.
An alternative theory is that planets are created far away from the star and migrate inwards. During this migration multiple planets can interact with one-another and be pushed out of the disk plane to higher inclinations. They could even flip over completely and become retrograde.
Now to come back to the actual question; the Solar planets probably have about the same inclination simply because they were created that way.
You are also right in saying that gravity will tend to align the planets. How this works physically is that the star can exerts a torque on the planet, which produces a tidal effect (like how the Moon creates tides on Earth). Over time this aligns the angular momentum of the planet to that of the star by pushing the planet towards the equatorial plane of the star.
As for your second question, yes, there are probably planetary systems which are misaligned with respect to the star. At least there are certainly planets that are not aligned with the equatorial plane of the star. The well named HAT-P-11b is a known example, but there are a lot more.
Note that for exoplanets the important parameter is not the inclination (which for exoplanets is the angle between the normal of the orbit and the line of sight), but rather the obliquity or tilt of the planet rotation with respect to the rotation of the star.
As for a third twist to this story, very recently there was a discovery of an entire proto-planetary disk that is misaligned with respect to the star, which opens the door to even stranger configurations.