Both of your sentences are grammatically correct.
As you pointed out there is a topic vs. subject distinction. 'subject' is merely a grammatical function in a sentence. It's the doer of the verb (generally). 'topic' is not a grammatical function; it's a semantic one: it's whatever in the sentence requires the most attention or focus or emphasis.
1.) Ramen ga suki desu. This is a neutral unmarked statement. "I like ramen"
2.) Ramen wa suki desu. This put emphatic attention on ramen, as if you are contrasting it with other stuff. "I like RAMEN (as opposed to the other types of noodles you mentioned)"
Because WA has a semantic function, its use largely depends on the context. So it is hard to give a hard and fast grammatical rule on its use.
But note that WA can also replace other particles, too.
kanji wo naraitai "I want to learn kanji"
kanji WA naraitai "It's kanji I want to learn, (none of that other crap you're trying to teach me!)"
Of course, it's not always about contrast. The very common "watashi wa sumo ga suki desu" simply topicalises watashi to make clear that of the two noun phrases, the one that functions as the main focal point, or topic, of the sentence is watashi. Likewise in "watashi wa daigakusei desu" or "watashi wa 50sai desu" wa is used to promote the subject of the sentence (typically market with ga to the semantic role of topic (it's still the subject though!).
Objects - as opposed to subjects - can also be topicalised.
sumo wa shinai kedo, judo wa suru. I don't play sumo wrestling, but I play judo. Here the objects, normally marked with 'wo' not 'ga' are topicalised with 'wa'.
The best way to learn it is to listen and read as much Japanese as you can!