How does opening preparation work at GM level? From what I can gather, one studies what the opponent has been playing, and prepare responses for their favourite lines. The problem is, there's no guarantee the opponent will play a given opening. For example, suppose I'm playing against Kramnik with white. Kramnik is the person who famously defeated Kasparov with the Ruy Lopez Berlin, so I prepare something special for 1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6. But then in the actual game, all I can control is the first move. After 1. e4, it's conceivable that Kramnik plays 1...d5,  1...Nc6, or 1...e6.

My guess would be that GMs have some kind of plan mapped out for every possible response - but that sounds like a formidable amount of lines to remember, especially with opening lines running 15+ moves deep.
Professional chess is hard.


Yes. Professional elite players prepare as many opening lines as they can. They have seconds who are dedicated to opening preparation (generally on a computer). The most well paid players such as Magnus Carlsen has a team of seconds. Read more about chess seconds here.
The seconds are paid for improving the master's opening preparation. Those guys are generally grandmasters. They would use database, recent trends, common sense etc to make preparation. Some players such as Maxime Vachier-Lagrave are easy to predict. MVL has been a consistent Najdorf players for years.
Of course, nobody can prepare every single possible response in chess. However, the more a GM prepares the better competitive advantage he has. Chess is a relative game - you don't need to play perfectly, you just need to play better than your opponent.
No preparation is perfect. All players must sooner or later make a new move. However, the more prepared you are the less likely you're the first player "out of book".
All professional chess players need to know extraordinary number of possible opening variations. Sometimes they don't remember the exact lines, but they know similar lines or ideas. Then, we would think over the board.
Most prepared lines are used later on against someone else.