Although The Namesake is written in the third person, we get the story through the filter of different characters' points of view, primarily those of Gogol, Ashima, Ashoke, and Moushumi. Thanks to this limited omniscient voice, we get psychologically complex portraits of many characters, and we come to understand what they feel, what they know, and what they don't know (as in, what other characters are keeping from them).
This narrative technique means that we don't get the story in chronological order. Memories appear in the novel as they occur to the characters, so we get a sense of how the past and the present connect. For example, the story begins in Cambridge, Massachusetts, in 1968, but Ashoke's memories of his train accident in 1961 don't appear until a few pages later, when Ashoke is standing in the hospital waiting room, looking back on what led him to this place. Here, the narrator enters Ashoke's thoughts: "Being rescued from that shattered train had been the first miracle of his life. But here, now, reposing in his arms, weighing next to nothing but changing everything, is the second." (2.15) Memories like these pop up when they are relevant. In this case, it's because this particular memory helps us understand why in the world this Bengali man is naming his son after a dead white guy.
But moments like this also serve another purpose. In this case, this particular moment allows us to understand just how important Gogol is to his father, and how much Ashoke loves his son. Just keep in mind that the narrator is giving us a VIP pass. Gogol is not so lucky, and while it's easy to grow frustrated with him later in the novel for not appreciating his father, we have to keep in mind that he doesn't have all the information we do. He's not in the know.