She doesn't die in the first few books of the eight-book Anne of Green Gables series. Later in the series, I believe she does die (as far as I recall). However, if I'm right, it would be after Anne has her own family and is living somewhere other than Green Gables.
The movies both condense the Anne series and leave things out, and the third is NOTHING like any of the books. I was really disappointed in that third one and what they did with it!
***Addition: I checked through Rilla of Ingleside (the last book), but didn't find a mention of Marilla Cuthbert at all. As I recall (if I'm remembering correctly), one book has a passing reference to her death. However, in Rilla of Ingleside, Anne and Gilbert go to Avonlea but the only one mentioned in reference to their visit is "Aunt Di" or Diana. So, I'm assuming that means Marilla is gone before World War I.
I did a quick check and found that Marilla is mentioned, and thus alive, at the beginning of Anne of Ingleside (6th book), but I don't find anything more about her in the rest of that book. I'd have to read the entire series to be definite, but I thought there was a passing reference to her death. If there is, my scanning missed it. Possibly I'm thinking this because Anne goes to Avonlea but doesn't see Marilla? The only other possibility is that I'm mixing up an episode of Avonlea with the Anne of Green Gables books (I know one had Marilla dying).
Basically, I guess I'm saying I THOUGHT she died in the series, but don't remember which of the latter books would have it. This site http://www.tickledorange.com/LMM/Anne.html is a special L.M. Montgomery site. It also has message boards where you could probably ask a question like this of people who are more "expert" on Anne.