Johann Lamont said her party was back on track with its "emphatic" by-election victory, although there was less of a swing than in the recent Aberdeen Donside by-election and the win came against the background of the Bill Walker domestic abuse case.
Cara Hilton took the seat in west Fife with a 2873 majority, making Dunfermline the second safest Labour seat at Holyrood, behind Dumfriesshire.
The Scottish Labour leader hailed the win as a sign fortunes are turning in Labour's favour.
"It's a very positive step. It's a very substantial result, an emphatic result. And given where we were in 2011, this is a very important stage," she said during a visit. "That's where we've got back to, being in a process where we are able to compete politically.
"Because the defeat in 2011 was so significant, then we know the scale of the challenge. What this does, however, is it confirms that both politically and organisationally we are able to compete and we can build on this."
SNP leader Alex Salmond pointed out that if the 7% swing to Labour in Dunfermline was replicated nationally, his party would still be the largest.
The by-election was triggered by the resignation of Bill Walker, jailed last month for abusing his three ex-wives.
He won the seat for the SNP with a 590 majority over runner-up Labour but was kicked out of the party when the allegations surfaced.
Walker clung on to the constituency as an Independent, even after being convicted. Eventually he resigned amid public outrage and is now in jail.
His actions meant the SNP was forced to defend the constituency midway through its second term in government.
Ms Hilton said: "The people of Dunfermline have rejected Scotland being put on pause for another year. The Government of Scotland has been suspended so that a referendum campaign can be won."
She added: "We are only here tonight because of the bravery of three women, three women who came forward to demand justice and who won that fight.
"Their courage and determination must be a reminder to all of us that we need to work harder to ensure that all victims of domestic violence are able to come forward and receive the justice they deserve."
SNP candidate Shirley-Anne Somerville, said her party could be proud of its campaign which focused on the threat of school closures in the area.
"We've run a positive campaign trying to support local parents in their schools and I hope we can come together, all of us in the party, to make sure those three schools in the Dunfermline constituency stay open," she said.
Liberal Democrats have been successful in the past at Westminster and Holyrood levels but would have needed to persuade a huge number of people to back them this time around.
Candidate Susan Leslie drew attention to the number of women standing in the contest but she gained just one-third of the votes the LibDems achieved six years ago. The Tories put on votes, despite the arrival on the scene of Ukip which, like the Greens, lost its deposit.