Buoyed by a tight alliance with President Donald Trump but clouded by a series of looming corruption indictments, Netanyahu is seeking a fifth term in office that would make him Israel's longest-serving leader, surpassing founding father David Ben-Gurion.
He faces his stiffest challenge in a decade from Gantz, a telegenic former military chief whose Blue and White party has inched ahead of Netanyahu's ruling Likud party in the polls. Netanyahu, however, still appears to have the better chance of forming a coalition, with a smattering of small nationalist and ultra-Orthodox parties vowing to back him.
In the campaign's final days, Netanyahu has veered to the right, vowing to annex Jewish West Bank settlements if re-elected and embarking on a media blitz in which he portrays himself as the underdog and frantically warns that "the right-wing government is in danger."
"The hour is very late. Right now, we are behind by a few seats," he said during a surprise visit to Jerusalem's Mahane Yehuda outdoor market. "The only way to ensure to close the gap, to make sure the Likud will form the next government for sure, is that there will be big Likud."
His nationalist allies, however, see the move as a repeat of his 2015 election tactic to draw away their voters as he did four years ago when on election day, he warned of Arabs turning out in "droves." The scare tactics were seen as helping him seal a come-from-behind victory.
With Israel generally safe and thriving, the Palestinian issue largely sidelined and no major existential matters on the agenda, the focus of Tuesday's election has shifted to Netanyahu himself. Israel's attorney general has recommended indicting him on bribery and breach of trust charges in three separate cases. Rivals have also begun to question a deal in which Netanyahu reportedly earned $4 million on a German submarine sale to Egypt by owning shares in one of the German manufacturer's suppliers.
"People realize that realistically, the right wing isn't in danger. It's Netanyahu who is in danger," Gantz told Israel's Army Radio. "This isn't a danger in the security sense, only in the legal sense, because he has to provide explanations for what he did."
Netanyahu denies any wrongdoing and claims the accusations are part of a liberal media's orchestrated witch hunt against him. Gantz, who has been vague on key policy fronts, has presented himself as a clean, scandal-free alternative to Netanyahu. He is banking on voters tiring of Netanyahu's long, divisive rule.
Netanyahu's campaign has focused heavily on smearing opponents as weak "leftists" who are conspiring with the country's Arab parties against him. Opponents accuse him of incitement and demonizing Israel's Arab minority, which makes up roughly 20% of the population.
Polling stations open at 7 a.m. Tuesday (midnight EDT Monday), with exit polls expected to be announced at the end of voting at 10 p.m. (3 p.m. EDT). Election day in Israel is a national holiday, with turnout expected to be high in good weather.
Official results will begin streaming in early Wednesday, but it may take far longer for a final verdict to be delivered, given the fragmented state of Israeli politics. As many as a half-dozen parties are teetering along the threshold for entering the Knesset, or parliament. A failure by any of these parties to get the required 3.25% of total votes cast could have a dramatic impact on who ultimately forms the next coalition.
The Israeli government needs a parliamentary majority to rule, and since no party has ever earned more than 61 of the 120 seats in the Knesset, a coalition is required. Netanyahu and Gantz have ruled out sitting together in government, so the next prime minister's identity will likely come down to how many supporters each candidate can recruit.
Israel's president, Reuven Rivlin, could play an important role. Though largely a ceremonial post, the president is responsible for choosing the candidate with the best chance of building a stable coalition government as prime minister.
"I think Blue and White has a 50% chance of being the largest party. And Gantz has a less than 50% chance of becoming prime minister because the name of the game is forming a majority and Netanyahu's bloc has the best chance of doing that," said political analyst Reuven Hazan.
Even if Netanyahu is re-elected, he could have a difficult time governing. Some of his allies have indicated they will no longer back him if formal charges are filed. "Netanyahu's looming indictment is the question of the election. If he forms a government, he'll drag this out as long as possible, try to change the laws and argue it's the people's will that he remains in power," Hazan said. "If he loses, the house of cards collapses."
In a campaign that has been long on scandal and short on substance, the election has emerged as a referendum on Netanyahu and his 13 years overall in power. The 69-year-old prime minister has been the dominant force in Israeli politics for the past two decades and its face to the world. He's generated much of his popularity from projecting a tough image in the face of Iran's rising power and for keeping Israel safe and prosperous in a hostile region.
"Never in the state of Israel has it been as good as during the time of Bibi. Never, never, never. The economy is excellent, people live in abundance," said Jerusalem resident Amiga Shaike, 68. But in Gantz he has encountered the rare opponent who can match his security credentials. Along with two other former military chiefs on his ticket, Gantz has attacked Netanyahu for failing to halt rocket fire from the Hamas-ruled Gaza Strip and allowed centrist Israelis to seriously imagine a post-Netanyahu reality.
"We're voting for him because we need a change, we need to get Bibi out of the government. We need a new brain, a fresher brain in charge," said Tel Aviv resident Daniela Greenwood. "We need to make two states, we need to make peace, we need to move forward with the situation."
Associated Press writer Isabel DeBre in Jerusalem contributed.