Tractate Berakhot begins by discussing what time the Shema (only two paragraphs were recited at night, Deuteronomy 6:4-9 and 11:13-21) is recited in the evening. It probably begins by discussing the evening Shema because in rabbinic thought the day begins at night. This is also the order reflected in Deuteronomy 6:7 and 11:19, Recite them when you lie down and when you get up. In our mishnah the sages debate what the halakhic meaning of the words when you lie down really are.
Section one: The priests would immerse at dusk so that after the sun had set and the stars came out they could go into their homes and eat terumah. Rabbi Eliezer determines that until the sun has set the Shema cannot be recited. The night is divided into three watches. Rabbi Eliezer holds that once the first watch has passed (this would be about 10 PM, if the day and night are both 12 hours), one can no longer recite the Shema. It seems that he interprets when you lie down to mean that the Shema must be recited at a time when most people go to sleep, that is between the time that the stars come out and the end of the first watch.
Section two: The sages say that he can read the Shema only until midnight.
Section three: Rabban Gamaliel says that the Shema can be read until the sun rises the following morning. As we shall see below, Rabban Gamaliel does not actually disagree with the sages but rather explains their opinion.
Section four: In this story Rabban Gamaliel's sons are out all night at a wedding party and they do not come home until early in the morning. Being good rabbis children, the first thing they ask him upon their return is if they can still recite the evening Shema or whether they have missed the opportunity altogether. Rabban Gamaliel answers that if it is not yet dawn, they may still recite the Shema.
Section five: Here and in the following sections we see that Rabban Gamaliel holds that whenever the sages say that a certain mitzvah must be performed before midnight, in actuality it can be performed until the following morning. The sages said that the mitzvah should be performed before midnight so that the person would perform the mitzvah with plenty of time to spare and not miss his opportunity and thereby transgress. The mishnah brings two more such cases where they said that the mitzvah should be performed before midnight but it could actually be performed until the following morning. Parts of sacrifices that were not offered during the day were offered at night. While this should be done before midnight, if not done by then it can still be done up until the following dawn. Similarly, some sacrifices can only be eaten for a day or two and the night that follows. The sacrifice should be eaten before midnight, but if it is still leftover it can be eaten until dawn of the following morning.