A gambit is a chess opening in which the first player risks or sacrifices material, usually a pawn, with the hope of achieving a resulting advantageous position. A gambit used by the black side in response to a gambit played by white is called a countergambit (exe., Albin Countergambit).
There are three general methods in which a gambit can help a player's position. For a gambit to be sound it will typically have some degree of at least two of the following:
In modern chess, the typical response to a moderately sound gambit is to accept the material and give the material back at an advantageous time. For gambits that are less sound, the accepting player is more likely to try to hold onto his extra material. A rule of thumb often found in various primers on chess suggests that a player should get three moves of development for a sacrificed pawn, but it is unclear how useful this general maxim is since the "free moves" part of the compensation is almost never the entirety of what the gambiteer gains. Of course, a player is not obliged to accept a gambit. Often, a gambit can be declined without disadvantage.
A good example is the Danish Gambit: 1.e4 e5 2.d4 exd4 3.c3 dxc3 (3...d5 would be a way of refusing the gambit) 4.Bc4 cxb2 5.Bxb2. White has sacrificed two pawns, but his bishops are very well developed, looking to the opponent's kingside. A very dubious gambit is the so-called Halloween Gambit: 1.e4 e5 2.Nf3 Nc6 3.Nc3 Nf6 4.Nxe5?! Nxe5 5.d4. Here the investment is too big for the moderate advantage of having a strong center.
The word "gambit" was originally applied to chess openings in 1561 by Spanish priest Rúy López de Segura, from the Italian expression dare il gambetto (to put a leg forward, i. e., to trip someone). Lopez studied this maneuver, and so the Italian word gained the Spanish form gambito that led to French gambit, which has influenced the English spelling of the word. The broader sense of "opening move meant to gain advantage" was first recorded in English in 1855.