Answer: A. had gone.
Step-by-step explanation: When we write, we need to understand when to use each type of past. We use past simple when we describe events in the order that they occured, for example, I woke up, brushed my teeth and went to school. We use past perfect when we want to describe what had happened before a certain time in the past, for example, when she arrived, I had already left. In the given sentence, the correct form is past perfect, so the answer is: I had gone to bed two hours before it started raining.