A manhunt is currently underway to find the suspected shooter, Tel Aviv police commander Ami Eshed said.
The number of wounded was not immediately clear. Speaking on Israeli TV, Eshed put the number at more than a dozen.
The attack happened at a bar on Dizengoff Street, a popular dining area in the center of the city, an Israeli police commander said.
Journalist Lauren Izso, on the scene shortly after the attack, estimated hundreds of police were involved in securing the area and searching for the gunman.
Speaking on Israeli TV, Tel Aviv mayor Ron Huldai told residents in the city to stay home.
The two people killed were men who were both around 30-years-old, a spokesperson for the Magen David Adom emergency services said.
Tel Aviv’s Ichilov hospital, where most of the casualties were taken, said doctors were fighting to save the lives of four people who were wounded.
The shooting is the latest in a series of violent incidents that have put Israel and the Palestinian territories on edge.
In just one week in March, 11 people were killed in three attacks in Israeli towns and cities. It was the deadliest week Israel had seen in years and follows weeks of rising tensions that saw Israelis targeted in stabbing attacks and several Palestinians shot dead by Israeli forces in the West Bank.
It’s not clear whether Thursday’s shooting is connected to the recent violence.
Militant groups in Gaza and the West Bank praised Thursday’s attack, though they stopped short of claiming responsibility.
Hamas called it a heroic operation, while Islamic Jihad vowed “resistance will continue.”
Condemning the attack, the United Nations Special Coordinator for the Middle East Tor Wennesland, singled out Hamas in a tweet, saying, “Deplore the welcoming of this attack by Hamas; there is no glory in terror. These attacks must stop now and be condemned by all.”
CNN’s Abeer Salman, Ibrahim Dahman, Andrew Carey and Hadas Gold contributed to this report.