Gas is a unit measuring the computational work required to execute a transaction on a blockchain network. The price of using a decentralized service reflects both the ‘gas’ costs of executing the contracts transferring ownership of that asset and the price users are willing to pay for such a service.
Gas price represents the amount a user is offering to pay for a discrete quantity of expended computational power, somewhat akin to paying for hours of labor. A gas limit specifies the total amount a user is willing to spend on computational labor. (This is important in cases where bugs in code would have computational power used indefinitely.) Users pay for expended computational power regardless of whether it sufficient to complete the computation executed—as a deck is unlikely to be fully constructed with two hours of labor, some transactions can fail due to too low a gas limit for the task’s complexity. In this respect, the onus is on the ones designing or using a smart contract to set appropriate gas prices and limits, not on those providing the computational resources to deliver the service paid for.
Ethereum introduced the notion of gas costs. Subsequent platforms have either adopted the approach wholesale, or have appealed to gas as an analogy meant to illuminate token functionality.