Learning the alien language changed the way she percieved reality. This already happens in our own world, ie. some languages have different words for different shades of blue and those speakers therefore perceive those two shades quite distinctly, whereas and English speaker can't see that they are actualy different shades. I believe this is Russian I'm referencing, but I can't be sure of that. German, which has amazing words like Schadenfreude and a word that means a face that needs a fist hitting it, might produce speakers with entirely different emotional capacities than a totally different language.
So in learning their language she perceives reality differently, in a non-linear fashion. Due to the limitations of the film medium, we were shown this as scattered snippets of information. what it really means is that all of reality happens simultaneously, we just can't percieve it that way. The Heptapods can and, therefore, can't draw the distinctions between the future and past that we can. They can experience all those events simultaneously. When they said, "Time is running out." it's because they were actually experiencing that crisis 3000 years in the future as they said it.
As Louise gets better at speaking the language she will likely experience her entire life simultaneously, but in the events depicted in the movie she was only starting to percieve her life that way. The General giving her that vital information in the future was an inuitive action based on what he experienced that momentous day and what he's learned about the heptapods since then.
The opening footage of the movie, with her and her daughter, was not Louise experiencing flashbacks. It was simply us being presented information that we see throughout the movie and then at the end. We were given the opportunity to perceive time simultaneously. Lousie only started doing that partway through and had no idea what she was looking at.
The final scene in the movie is the most powerful, imo. What it means is that Louise has now experienced the wonderful life and horrible death of her daughter... and chose to experience it all anyways. She (bravely, imo) chose to experience the incredible joy of a mother's love even though she knew it would also mean the incredible pain of a mother's loss.
The reason her husband left (and no longer looked at the daughter the same) is because Louise warned him what would happen to their daughter and he couldn't forgive her for deciding that he would also experience that kind of pain. It was all in that single moment that she, with all her heart, said she wanted to have a baby, and he had no idea what would happen later.