Seems a few people beat me to some of the best examples - Ogre Battle / Tactics Ogre, JRPGs from the SNES/PS1 era that offered huge depth based upon what you did and who you friended/went against etc. I can't believe that another great JRPG has been missed - Chrono Trigger! Talk about branching storylines and endings! There are some other JRPG games, such as the Agarest series that have some branching storylines (5 generations, things differ depending on who you marry etc).
On the Western and more recent offerings, Morrowind, DeusEx (all of them), and Vampire The Masquerade: Bloodlines all had some branching story paths based on your choice, as did the Mass Effect Series. However, the very best recent, "cinematic, Western" game I can think of that did this best of all is Alpha Protocol.
If you haven't played Alpha Protocol, it is pretty much truly a "Spy movie you control". There are TONS and tons of factors that change the story in significant ways. From the start you pick your starting skils/class which affects how people see you (Were you a soldier? Spy? Worked in the tech department? Fresh recruit? There's even a secret class that may unlock....). Every conversation has at least 3 replies named after the 3 "JB" spies - James Bond (suave, flirty, and snarky), Jason Borne (professional and to the point) and Jack Bauer (Aggressive, demanding, controlling -TELL ME WHERE THE FUCKING BOMB IS OR I RIP OFF YOUR LEFT TESTICLE heh), plus sometimes a "special" 4th option. Everyone you speak to has a faction system, ranging from -10 hating you to +10 loving you, and favors certain reply styles - though they aren't 1 dimensional where you can just keep hitting the same reply every time and it will work, as they have their own (often hidden) motivations that will require thoughtful communication to help, hinder, or unveil. Positive experiences with some will alienate others. The way you play the game, with stealth or going loud, letting certain people go or bringing them in etc.. all impacts things as well even WAY down the line. Hell, there's a certain (some say the hardest boss in the game) you can not even have to fight if you play your cards right and its hard to do so (ie you have to perfect stealth a certain level without even using tranq darts or non lethal takedowns and thats only PART of getting his respect). Each person, enemy or friend has a file you can complete to learn about them, including a "secret dossier" which can often be used for a major gambit, but you can't get all of them for everyone in a single playthrough.
The only downside to the game is the somewhat cumbersome control mechanics (ie you can't drag bodies) and was originally buggy (Obsidian developed I think, Sega produced), but it is an amazing example of a story based game that should be the benchmark for interactive, meaningful choice and depth based storytelling.