You firstly have to know that the major reasons her predecessors didn't win their battle against the trade unions was that they never actually had a battle.
Her immediate predecessors were Labour, and hence did not battle the unions as both the Labour party and the unions were a part of the same workers movement and to some extent was made up of the same people.
The previous conservative prime minister was Edward Heath. He did end up in a conflict with the unions, and called an early election in an attempt to face them down. However, it failed since Labour won, so that battle was lost almost even before it started.
So what made Thatcher succeed then? Well, I think there were two major reasons. The first one was that she actually remained in government. This in turn have two reasons:
She was elected by a disgruntled middle class who was tired of Labour failing to do anything to fix Britain's economic problems, and indeed failing to even look like they wanted to fix them. The fact that the economy started going better during Thatchers period, and continues doing so during her premiership, meant she retained the support of most if this group, and won two further terms.
Labour split in 1981, and since Britain has a first-past-the-post system and the Labour vote ended up split, she won the 1983 election easily, (even though the Conservatives actually got fewer votes than before).
The Falklands war probably helped, but the common claim that she would have lost if it hadn't been for the war has little support in actual numbers. Although her popularity peaked after the war, it was already on the way up after reaching a bottom in the end of 1981, and it also went down between the end of the war and the election. One year before the 1983 election her ratings were no worse than one year before the 1987 election and she got similar amount of votes in both elections. So the Falklands war may have helped, but there is little support for the claim that she would have lost the election without it.
The second reason she won the battle with the unions was pure stubborness. She let the unions strike until they ran out of strike funds. She let unions strike until the companies the strikers worked for went bust. She was willing to take an economic penalty by letting the strikes go on and on, in exchange for fixing the economy long-term. That sort of long-term view is unusual amongst politicians elected on four-year stints and usually only interested in getting re-elected.