Hands down Mouse Keyboard Headset.
The mouse is the primary interaction tool in most video games. It's how you look around, attack, interact, and much more. Mice are much more susceptible to glitches as well, making it even more important to get a good one. I have never had a keyboard glitch or badly malfunction in my many years of pc gaming. Also, although there are many buttons needed for MMO and MOBA games, mice have that covered. The Mad Catz R.A.T. MMO7 for example, has in total 90 programmable buttons, more than any game requires. You can play almost any game without even using a keyboard if you use the right mouse.
The keyboard is second because it's obviously more important than the headset, which is not entirely necessary, while not being as important as the mouse. It serves as the primary movement tool in most games, and is also the general way to use items and special abilities. Macro keys are also very useful, especially in MMO and MOBA games that rely on abilities and combos.
I placed the headset last because although it is always nice to listen to 7.1 surround sound headsets, they're not really necessary. I mean, it is useful to hear the game, to tell if there is an enemy behind you, to hear alerts, etc. but it isn't as vital as the other two peripherals.
In all, the mouse is the most important computer accessory in my opinion. Depending on how serious of a gamer you are, you will probably want to get a good mouse (maybe 40-70), and if you have some extra money, you should decide which of the other two to spend it on. Unless you're playing MMO or MOBA games, any working keyboard will suffice, and the pair of earbuds that came with your phone are perfectly fine as well. If you are playing multiplayer and communication is important however, you will want to spend the extra money to buy a headset. You shouldn't need to spend more than $60 unless you are an audiophile.