Games seldom allow you to experience them all at once or in any order you choose. Though open-world design has become more popular, there are usually some obstacles to exploring the world in its entirety, even if in some cases they aren’t obvious. There are good reasons for this, ranging from attempting to control the narrative arc, to keeping the player from being overwhelmed by too many options, to adding a sense of mass and mystery and resistance to the created world. Whatever the reason, it’s generally necessary for the world to resist the player’s exploration.
For each gate restricting the player’s access to the game world, there is also a key, and these keys and gates can come in many different forms. In traditional hack and slash RPGs, powerful enemies gate off later sections of the game, and the player metaphorically opens these gates by more literally opening up the monsters’ rib cages with edged weapons. Doing so only becomes possible once the player has accumulated enough experience and equipment to survive the encounter, though – thus, this equipment and experience becomes the key necessary for exploring the protected area. In adventure games, the keys are usually easy to acquire, and the challenge of the game is more often in finding the particular gate a key is applied to, and the manner in which it is applied. In Metroid-type exploration platformers, new movement abilities allow the player to access sections of the map that were initially impossible to reach, and this too forms a key-and-gate relationship.

Of course, more often than not, it’s actually just a literal key that you, the player, need to open a specific door. It’s boring, but it works… assuming that the presentation of the game isn’t such that, logically, your character ought to be able to explode the stupid door off its hinges with a minimal effort. Which, games being as they are, it usually is. Whatever.
So there are the two components here, the gate and the key. Gates can be hard or soft: A hard gate completely shuts you out of an area, as with a locked door, while a soft gate makes staying in an area untenable, as with an atmosphere made of cursed poison virus acid, which makes you take damage as long as you breathe it in. A clever, determined, or knowledgeable player can frequently navigate through soft-gated areas, but a hard gate is impossible to bypass – or, at least, it is intended to be so. Players can be pretty sneaky.
In addition to whether the gate is hard or soft, the matching key can be simple or complex. Simple keys do nothing outside of their function as a key: Regardless of their presentation, whether they’re a power orb that is needed to activate a bridge or an incantation needed to open a portal or, again, just a damn key, they have only one function, and that’s to open one or more doors. However, keys can be so much more than this: A common example is found in many movement abilities, which allow the player to access new areas, also allow for new and interesting decisions to make in moment-to-moment gameplay. The double-jump allows the player to reach the high platform that leads to the next area, but it ALSO allows them to walk off a ledge, duck under an enemy attack, and then hop back up out of the spike pit to strike at the enemy without slowing down or taking damage.

Personally, I think complex keys are really cool: it’s a way to expand the player’s explorations in a natural-feeling way, and makes the player feel as though they themselves have gained power rather than just being allowed into the next section of the game.
That said, it’s quite easy to fool yourself into thinking you’ve made a complex key when it’s actually a simple key in disguise. In The Legend of Zelda: A Link to the Past, you encounter many rocks, mostly light-colored ones with a few dark ones scattered about, which block your way – and, early on in the game you find the power bracelet, which allows you to lift the light colored rocks, but not the dark rocks. This allows you to access many new areas, but also allows you to pick up rocks to use them in combat, to dig under them for items, and to toss them to solve puzzles. It opens the game up in lots of ways beyond just opening up gated areas. After a bit, you notice that the dark rocks only seem to be placed in such a way as to block you from exploring certain areas, which is annoying, and start wondering when you’re going to be able to do something about them. Near the end of the game, you finally acquire the upgraded power bracelet, which you’ve been anticipating the entire game, and… you pick up those few rocks, poke around in the areas you haven’t been able to explore, and that’s it. There’s little to no use for the upgraded power bracelet outside of exploring those areas: Dark rocks don’t do more damage (despite being, presumably, heavier), you can’t throw the light ones any further or harder, you can’t push blocks faster or knock enemies around with your attacks. It is, in short, a total fucking letdown.
This isn’t really a new topic. I’m sure someone has discussed it before, though I am as ever too lazy to find out who, or whether I’m duplicating their work, or whether this is all actually blindingly obvious. Now’s a good time to discuss it, though, because free-to-play games are particularly fond of viciously abusing gating mechanics, and it’s worth discussing exactly how.

First: Free-to-play games overwhelmingly favor soft-gating. This is because they can’t really call themselves ‘free’ if parts of the game are inaccessible without paying, but it’s central to their profit model that most or all players feel that they need to spend money to progress.
Second: The keys used to progress past these gates are exhaustible, and usually easily so. Either the key is an item that can only be used a limited number of times, or for a certain period of time, or the key comes in the form of a currency that’s used to buy something that the player will need LOTS of. The players who have demonstrated willingness to pay are the most valuable players, so it’s central to the profit model of free-to-play games that these players never be satiated for long. These players are sold dissatisfaction, on an installment plan, at premium prices.
For contrast, note that if a game uses hard gating and non-exhaustible keys, it actually becomes an example of episodic gaming. If it uses hard gating and exhaustible keys, it would be a form of subscription gaming, and if it uses soft gating and non-exhaustible keys then it’s… well, basically a game with paid cheat-codes built in.
Anyway, there’s plenty to think about here. Gating is a foundation of moment-to-moment game design, and like most tenets of good game design it’s been twisted into something monstrous by the ethically bankrupt currently trendy model of free-to-play. There are many examples of gating done brilliantly, gating done poorly, and gating done in the service of evil and exploitation out there, but I think I’ve covered most of the idea here.
The power of the closed door is the power of mystery, of potential, of not knowing what is coming next. The act of opening that door is packed full of meaning, no matter what comes next. Where you’re going is frequently less important than how you get there.
Open sesame.