Gravity is a measure of how fast a falling character reaches their maximum falling speed. A character with high gravity does not necessarily have a fast falling speed; they simply reach their top falling speed faster.
In Brawl and SSB4, the vertical knockback suffered by characters is based on both their weight and their gravity, with higher-gravity characters taking more knockback; horizontal knockback is unaffected. This reduces the natural effect of gravity on launch distance, keeping characters with low weight but high gravity (most notably Fox) from having disproportionally high vertical endurance. Despite horizontal knockback being unaffected, fighters with higher gravity tend to have poorer horizontal endurance, due to the gravity compensation resulting in slightly higher hitstun. Since a character's air friction only takes affect after the hitstun ends, this results in it taking slightly longer for fighters with higher gravity to be slowed down by their air friction, thus resulting in them dying earlier. It also affects how difficult the character is to combo - by applying slightly more knockback to characters that more quickly fall into the next attack, it slightly normalizes the effect of setup and multi-hit moves on the cast.
Gravity also affects how high a character is able to jump; two characters with the same jump force will not jump the same height if they have different gravity.
In Smash 4, a character's gravity can be altered by using the equipment bonus effects, Thistle Jump or Anchor Jump, with Thistle Jump decreasing it, while Anchor Jump increases it. However, both bonus effects also alter a character's falling speed.
Super Smash Bros. gravity values
Super Smash Bros. Melee gravity values
Super Smash Bros. Brawl gravity values
Super Smash Bros. 4 gravity values