After I posted the other day I remembered a PS2 game I played a few years ago, Grim Grimore. It's a Real-Time Strategy game which isn't most suited for console play, but that isn't why I'm bringing it up.
The story of the game has you playing a young witch named Lillet Blan joining a magic school, we'll skip the Harry Potter jokes. Each chapter of the story progresses through cut-scenes interspersed with RTS fights. After the first five chapters taking place over her first five days at school. Our heroine is attacked by what essentially amounts to the Devil, and does not survive. Yep, she dies.
Then she's back at the first day and only she remembers what happened. For extra fun from a gameplay perspective she also keeps all the power and skill she gained over the past five days. So Lillet spends five days trying to prevent the deaths of everyone in the building, but fails and is reset again. This happens a total of five times with Lillet getting stronger each time until she is finally able to save the day.
I was thinking about this game again after beating Back to the Future and remembering other uses of time travel. Back to the Future goes with the idea of how changes impact the future (we'll ignore the plotholes of that series, and believe me the game is full of them too.) which is excellent from a story point of view. But story is only half of what makes a good game, gameplay is the other piece. The time travel in Grim Grimore works for the story but also serves to boost the gameplay.
Trying to change the events of each five day loop leads Lillet to different RTS encounters, but as she is constantly resetting and getting stronger the gameplay ties directly into the story. While I don't want every aspect of the story to connect to the gameplay or vice-versa, in cases like this it makes the story substantially more engaging. At least for me.