What Lyle said is true―you'll want to practice a lot. It's much easier to recognize words and phrases you're used to hearing, not just used to reading. That means ear training, and there's no way around it!
Still, we can look at some facts about Japanese pronunciation. I'm a non-native speaker, and one of the trickiest things for a non-native speaker to do accurately is describe pronunciation details, but I'll try my best anyway :-)
Let's look at your example:
まだ学校へ行くには早い時間です。
mada gakkō e iku ni wa hayai zikan desu
The way I've romanized it here, I've split it into nine words. But is each word really pronounced separately with space in between? Of course not―we put words together when we speak. This is true in any language, not just Japanese.
So how are words put together in Japanese? First, let's start by grouping particles and auxiliaries with the words before them:
まだ 学校へ 行くには 早い 時間です。
mada gakkō=e iku=ni=wa hayai zikan=desu
In this sentence, we have the particles へ{e}, に{ni}, and は{wa}, along with the auxiliary です{desu}. I've grouped each of these with the words before them.
These groups form the basic accent phrases (APs) in this sentence. In normal pronunciation, each accent phrase is pronounced together as a group. In Standard Japanese (based on a Tōkyō accent), each accent phrase contains at most one large, rapid drop in pitch called a pitch accent.
For example:
[まだ]{HL}
ma↓da
This word is pronounced with a drop in pitch about halfway through. We say that the ま{ma} is "accented" because the pitch drops sharply afterwards.
This is the sort of thing you want to listen for. When you learn the word [まだ]{HL}, you can't just memorize the consonants and vowels. You've got to memorize the drop in pitch, too! That's just part of learning the Japanese language.
That doesn't mean you've got to sit down with a book and start writing down where the pitch accent is in every word. What it means is this: Listen to how native speakers of Japanese say words, and try to talk like them. We naturally learn by imitation. You'll come to absorb the fact that [まだ]{HL} has a pitch drop in the middle, and that'll help you recognize the word when other people say it.
And yes, that means you're going to have to practice listening and speaking! You can't learn to use the spoken language entirely by reading :-)
Let's take another look at our example sentence:
まだ 学校へ 行くには 早い 時間です。
ma↓da gakkō=e iku↓ni=wa haya↓i zikan=de↓su
There are three main pitch drops to listen for:
- ma↓da
- iku↓ni=wa
- haya↓i
And of course, in order for these drops to occur, pitch has to rise at some point, so you'll notice this sentence naturally goes up and down like a rollercoaster. This is what you want to listen for; these groupings help you identify the parts of a sentence.
In natural pronunciation, sometimes these phrases are run together into larger groups. If all five of the accent phrases were really pronounced separately like I wrote above, we might expect this:
[まだ]{HL} [学校へ]{LHH} [行くには]{LHLL} [はやい]{LHL} [時間です]{LHHL}。
You'll notice that I've written a fourth pitch drop here in [です]{HL}. But in terms of actual phonetics, you might not hear a pitch drop at all! Why not? Well, you wrote "des", right? Like the vowel /u/ was entirely missing from [です]{HL}. And if the vowel is missing, it can't carry a pitch!
So if it's pronounced that way, you won't be able to listen for a fourth pitch drop. And without a pitch drop, the pitch may never go up in the first place, which means the entire thing could be pronounced with a low, flat pitch! But you will be able to listen for what you've written as "jikan des". That's what the [時間です]{LHHL} notation represents, even if the physical pitch is flat.
But since I'm concentrating on the physical pitch you need to listen for, and not so much on the theory, I'm going to cheat here and write [時間で]{LLL}す. So let's do that, keeping in mind that it's cheating a little bit :-)
[まだ]{HL} [学校へ]{LHH} [行くには]{LHLL} [はやい]{LHL} [時間で]{LLL}す。
I think this is starting to look accurate. In natural speech, though, I think it might be grouped together like this:
[まだ]{HL} [学校へ行くには]{LHHHHLL} [はやい]{LHL} [時間で]{LLL}す。
After all, it's not really necessary for the pitch to be low at the beginning of 行く. What's necessary is for the pitch to be high before it drops, and it's already high at the end of 学校へ, so the phrases sort of naturally run together.
There's also a phenomenon called delayed pitch fall, which most people don't really notice, but you might as a learner, so I'm mentioning it here. For example, if the pitch fall is delayed in 早い, it might actually sound more like this to you:
[まだ]{HL} [学校へ行くには]{LHHHHLL} [はやい]{LHH} [時間で]{LLL}す。
Once you can hear these groupings and where the pitch accents fall, you'll have an easier time identifying lexical words and the particles and auxiliaries that attach to them.
Of course, in real life pitch moves smoothly up and down; people don't pronounce language by singing two different notes! That would be silly :-) So it might be something more like this:
Let's see what we can learn from your transcription.
You identified the first word as まだが. Listening for pitch tells us that can't be the case! The が must be part of the next word. Over time you'll also come to know that [まだ]{HL} is a word but [まだが]{HLL} isn't, and that knowledge will help you too.
You also wrote this:
In 学校 the individual readings がく+こう get contracted to がっこう. (Is there indeed a rule behind this? I heard the short pause in gakkou as a word boundary.)
Sure, there's a rule predicting it. The rules are too complicated to describe here; feel free to ask them separately or look them up for yourself in Laurence Labrune's The Phonology of Japanese (2012).
But there's not much point in describing those rules here anyway. You need to know that this is a word, and that it's pronounced /gakkoo/. It cannot be pronounced /gakukoo/. If you don't have this memorized, you won't be able to recognize it in speech; it doesn't matter whether or not you know the rules mentioned above.
By the way, I wrote /oo/ at the end because, even though the last kana is う, it's pronounced like お. You wrote "ou", but there is no /ou/ in this word, even though that's how it's spelled in kana. And I didn't write a ↓, because there's no pitch drop in this word for you to memorize. So it's actually pronounced like this:
学校 = [ガッコー]{LHHH}
In short, to recognize words like this, you have to have this knowledge internalized. You can't think about 学 and 校 combining at this point, because the speaker will be done with the sentence before you figure it out. If you're going to recognize words, you have to know them. And that just means practice.
The last thing you'll want to listen for in identifying words is devoiced vowels. This is another big topic, and I can't describe it in detail here, but you'll want to read about them and pay attention in your listening practice. In your example, the only devoiced vowel is in [です]{HL}, which we discussed above.
Sadly, there's no easy answer to your question. You're just going to have to learn to pay attention to all of these details. But don't worry! The more you practice, the easier it'll get :-)