What defines the name of a gambit? To be obvious, if someone were to use a gambit often (of their own theory), you would name that gambit after them or so, right (like the Ruy Lopez opening)? How then do we get the names of the gambits?
There is no general rule in naming openings or opening lines in general or gambits. Sometimes it’s the inventor, sometimes the place they lived, they were born, they played the line the first time, and so on. To make it more complicated, openings can have different names in different languages. In German, the Petroff defence is named Russian defence, and Benko Gambit is called Wolga-Gambit. The Sokolski is also called Orang-Utan. So there really is no general rule but in some cases some amusing histories.
Depends- there's no real rule outside of "convention" and when a name's settled on by the community at large, it tends to stay that way (as openings in general). Often, it'll be named after a person who played it a lot, developed the theory, a country related to it by the nationality of one or more people that played/developed it (or otherwise related), or the opening name was just made up by someone. Also, a lot of the time opening names have just been.. forgotten why.
Also note that some openings including gambits are known by multiple names- the first gambit example to come to mind is the Benko Gambit, which is sometimes called the Volga Gambit in Eastern Europe. So tldr: depends on the gambit, could be a bunch of reasons.
As the other answers indicate, gambits - and openings in general - can receive their names from different factors. A few examples:
The King's Gambit gets its name from opening with the king's pawn and gambiting the immediately adjacent flank pawn. The Queen's Gambit is similarly named, except the gambit is on the queen's side of the board.
Although the Budapest Gambit had been played previously, it seems to have taken its name from the location of the first time the gambit was used in a game of significance between high level players.
The book Chess Opening Names explores the naming of several popular openings, including some gambits. The book has three sections, one each for openings named for: people, places, and "stories". (As I type this, I'm about half way through the audio version of the book - mostly listening while I'm driving. The chess theory is light, but I find the history interesting.)