At least 28 people were injured, including an AFP news agency photographer, and 72 arrests were made.
Jets of water drenched groups of demonstrators seeking shelter, while others could be seen fleeing through clouds of tear gas.
The government cited renovation work as the reason for closing the square.
Thousands of people are said to have turned out for the march in the city’s central Sisli district, which was organized by trade unions.
Among them was a group of about 30 feminists who waved flags and shouted “all together against fascism” as police rolled them back, AFP reports.
The news agency’s photographer was assaulted by protesters wearing balaclavas, who broke one of his cameras.
Rioters threw stones and fireworks, and 22 policemen were injured, Istanbul governor Avni Mutlu announced.
Mr Mutlu said three demonstrators had also been hurt, but the AFP team saw 10 injured people. It said that most of those had suffered heart problems as a result of tear gas inhalation.
A Reuters news agency photographer saw six injured people.
After a troubled history, May Day was reinstated as a national holiday in Turkey in 2010, under pressure from trade unions.
Some of the marchers on Wednesday wished to commemorate 34 people killed during a May Day protest on the square in 1977, when unknown demonstrators fired shots into the air, sparking panic.