RAMAT GAN, Israel — With his good looks and suave manner, Yair Lapid had long been a celebrity and symbol of success here, building a strong following as a prominent journalist and the host of a popular television show.

But by the time the polls closed here Tuesday, it was clear that Mr. Lapid had reinvented himself as one of the most powerful political leaders in the country, leveraging his celebrity and a populist message that resonated.

Mr. Lapid, 49, was the surprise of the Israeli election. His party placed second, when polls said it would come in fourth. He had predicted that he would do better with his outreach to the middle class and his emphasis on social justice and the rising inequalities in society. He was right. His centrist Yesh Atid Party won 19 seats in the 120-seat Parliament, according to preliminary results, positioning Mr. Lapid as the chief power broker in the formation of the next governing coalition.

Mr. Lapid’s stronghold seems to have been the Tel Aviv area, with preliminary results showing he garnered about a quarter of the votes cast here in Ramat Gan and similar suburbs of Israel’s largely secular metropolis.