Mr Barak, an ex-general and former prime minister, said he would remain in his post until a new government is formed following the January 22 vote.
"I didn't make this decision without hesitating, but I made it wholeheartedly," he told a hastily arranged news conference, saying he had been wrestling with the decision, due in part to a desire to spend more time with his family, for weeks.
His resignation could mean the departure of the most moderating influence on hawkish Prime Minister Benjamin Netanyahu, who is expected to retain his job after the election. Mr Barak, who heads a centrist faction in parliament, has often served as Mr Netanyahu's unofficial envoy to smooth over differences with the US.
Mr Barak, 70, made the surprise announcement even after polls showed his breakaway Independence Party gaining momentum after Israel's recent military offensive in the Gaza Strip.
"There are many ways for me to serve the country, not just through politics," he said, though he evaded questions on whether he might serve as a cabinet minister in any forthcoming government.