A poll by the public Channel One station gave Barak 38 per cent of the vote in the contest, compared with 36 per cent for Ayalon.
A poll for the private Channel Two put Ayalon in the lead with 39 per cent and Barak at 33 per cent.
Peretz came in distant third with between 17 per cent and 19 per cent of the vote, the poll said.
His popularity ratings have been in single digits after he was blasted by a government inquiry for failures during last year's Lebanon war.
Both Barak and Ayalon have warned that they will pull Labour out of Olmert's coalition unless the beleaguered premier steps down because of the scathing Lebanon war inquiry.
Ayalon has vowed to do so immediately while Barak has said he would serve in Olmert's government as defence minister until early elections are held.
If Labour and its 19 ministers leave, Olmert's coalition will have the support of just 59 MPs, two short of a majority in the 120-seat parliament.
A senior Ayalon aide said: "Ayalon believes conditions are ripe for a change in government. There is enough support in Kadima to change its leader and then we could form a new government," he said.
Olmert could face three options - to resign, to try to form a new coalition with an ultra-Orthodox or a right-wing party, or call for early elections.
About 104,000 party members were eligble to vote in Monday's contest.