The Time Lords were losing the War. In desperation, they were going to attempt the Final Sanction. If it succeeded, it would have killed all life in the universe except for the Time Lords. The Doctor wouldn't allow that to happen, so he ended the War in a mutual loss, killing all of the Time Lords and Daleks except himself (or so he thought), for the good of the rest of the universe.
I don't think it was ever established that the Time Lords were losing the war, The Ultimate Sanction was developed to help them escape the time lock and their destruction when the Doctor used 'The Moment' to end TLGTW.
Was this ever shown on screen or is it something that happened after Sylvester McCoy but before Eccleston?( I'm leaving Paul McGann out because it didn't happen in the movie)
It was McGann doctor who was in the war, but literally everything we know about it has been revealed in the new series and thats all
In Rose, the first episode of the revived series, the (9th) Doctor looks in a mirror in Rose Tyler's flat and criticises his appearance (especially the ears), as if he's not seen it before. That suggests he was newly regenerated. It's certainly been assumed that whatever happened when he used the Moment (whatever that was) to "destroy Daleks and Time Lords alike" forced him to regenerate.
By the way, it's "The Ultimate Sanction". The name does, though, put me in mind of the Nazis' Final Solution and I don't think that's accidental.
The Last Great Time War was not shown on TV at all†, except in a few minor flashbacks (mostly in The End of Time). All we know about it is what the Doctor and other characters have said about it.
On-screen, nobody directly says why the Doctor chose to use the Moment to end the War. In the secondary media, we get a little more background (mostly from the Doctor Who Annual story by RTD and the IDW comics The Forgotten and Don't Step on the Grass), but still no explicit answer to you question. Behind the scenes (Confidential, interviews, etc.), there's again a little more information, but still no explicit answer.
Trying to piece together everything, from an out-of-universe perspective, it's pretty clear that RTD's original idea was that the Doctor had to destroy Gallifrey to prevent the Daleks from winning. Since the Eighth Doctor Adventures novel The Ancestor Cell had already tried to pull off a similar story and failed miserably, he decided it would be better to leave the details more mysterious this time. Later, he came up with the idea of the Sanction, and decided that was a much more interesting reason the Doctor had to destroy Gallifrey. So, that wasn't the answer in 2005, but it is now.
PS, it's called both The Ultimate Sanction and The Final Sanction. See http://tardis.wikia.com/wiki/Final_Sanction for evidence.
† The Daleks claim Genesis of the Daleks was the first attack in the LGTW, and RTD said that Parting of the Ways could be seen as the final battle of the LGTW, and presumably you could stretch that to the other Dalek stories up to Journey's End, and obviously the same for The End of Time. So, I suppose to be precise, I should say something like "The Last Great Time War, strictly construed as the events ranging from the Daleks withdrawing from history to attack Gallifrey up to the Doctor using the Moment, was not shown on TV..."