"I hate going to the hospital."
の in this sentence is what's called a nominalizer. It turns essentially turns the first part of the sentence, びょういんに行く, into a noun so you can use the は...です form on it. Think of it as a way of saying "the act of [preceding phrase]."
A more literal translation might be: "The act of going to the hospital is unlikable [to me]."
Ahh you're right! My brain must have been somewhere else when typing that. Thank you for the correction.
It was my understanding that 好き pairs with が and は marks the person doing the the 好きing.
は, in this case, is the topic particle. It makes it clear that the act of going to the hospital is the main idea, not the person itself. It replaces the が particle, as is standard with all particles except に, と, and で. In those cases, you append は after the particle instead of replacing it.
I'm a bit confused on what partical I should use after nominalize の. Is it always は or が or can I use に or で as well? I'm also not sure what partical I should use after the subject. Lastly, does の change the whole first part of the sentence into the subject?
It depends on what the thing you're nominalizing is doing in the sentence. I think it's usually は or が, but it can also be を. (Example: 授業に行くのを忘れました = (I) forgot to go to class.)
I'm not sure about のに or ので being used in this way, since they are also used as particles between clauses (のに = although/despite [the clause before it]; ので = because [the clause before it]). The WWWJDIC does link to some examples that suggest that のに, at least, can be used in this way as well.
I also put this and got a wrong answer... It seems not to like the kirai kanji?