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.
From Super Smash Bros. Brawl onward, the vertical knockback suffered by characters is based on both their weight and their gravity (once they enter tumble), 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, and in fact results in their endurance being slightly worse than a fighter with lower gravity. Despite horizontal knockback being unaffected, fighters with higher gravity tend to have poorer horizontal endurance, due to most moves with horizontal knockback having some degree of vertical knockback. Since a character's air friction only takes effect 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 getting KOed earlier. It also affects how difficult the character is to combo - gravity does not take effect on knockback if a character is not put into tumble. 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. This also makes characters with higher gravity considerably more vulnerable to chain grabs in Brawl and in Brawl onward, it makes moves with low knockback chain into them-self and other moves more reliably on characters with higher gravity when combined with Brawl removing DI against moves which do not put opponents into tumble (such as with Sheik's forward tilt).
As gravity does not take a direct effect on vertical knockback in Super Smash Bros. and Super Smash Bros. Melee, it acts as a force against vertical kncokback giving characters with higher gravity greater vertical endurance but increasing their susceptibility to combos. An example to show the effect on gravity with knockback is with Zelda and Sheik in Melee and Brawl. In both games, Zelda and Sheik have the same weight and in Melee, Zelda and Sheik have the same horizontal endurance but Sheik has better vertical endurance due to her higher falling speed and gravity. In Brawl however, Zelda has better endurance both horizontally and vertically due to her lower gravity (although Sheik has slightly better vertical endurance with momentum canceling).
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. Naturally, a character with higher gravity would jump lower than a character with lower gravity (assuming they have the same jump force).
In Melee and Brawl, gravity also affects how high a character will travel if they are aerial grab released. A character with high gravity will gain little height and will land quickly while a character with low gravity will gain a lot more height. Characters with very high gravity are at an advantage especially in Brawl as they will land before their grab release animation will end (although this puts them in a bad position if they end up off stage). Characters with very low gravity are also at an advantage as they will be released much higher into the air making it harder for characters to chase them and followup (in Brawl).
In Super Smash Bros. 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
Compared to the later Smash games, Smash 64 has very low gravity values for all characters and as with most attributes, Smash 64 uses a different scale to measure gravity.
Super Smash Bros. Melee gravity values
Melee significantly increased the gravity for all characters and it is largely the main factor as to why Melee is a less floaty game than its predecessor. Melee uses an alternate scale to measure gravity which would be reused in later games.
Super Smash Bros. Brawl gravity values
Much like with falling speeds, every character's gravity (except for Sheik's) was decreased. Brawl also introduced the gravity penalty where gravity would be added into the knockback formula for vertical kncokback causing characters with higher gravity to suffer from increased knockback once they enter tumble.
Super Smash Bros. 4 gravity values
Much like with falling speeds, gravity was increased across the board with most characters having higher gravity.
Super Smash Bros. Ultimate gravity values
Gravity values were once again increased across the board. Gravity notably no longer affects knockback for moves which send opponents at an angle between 70° and 110°.