He chased after the women, calling: "Hey baby, are you leaving now? Stay with me for a little longer."
After his behaviour was witnessed by street wardens the man was ordered to pay a £150 ($295 NZD) fine or spend three nights in jail.
The court of appeal overturned his sentence for both his comments and gestures. It said there was no distinction between "verbal or physical manifestation of thoughts or feelings" and both fell under freedom of expression.
It said the Rotterdam bylaw was invalid and did not make the difference between permissible and punishable behaviour clear enough, which is necessary under the European Convention of Human Rights.
A number of other prosecutions under the law have been made in Rotterdam but there have been no convictions to date in Amsterdam.
In 2017, Rotterdam published research showing that 94 percent of women aged between 18 and 45 had been harassed on the street but had not reported it.
The court's ruling said, "In the Netherlands there is a multicultural society and in, among other things, the municipality of Rotterdam there is a strong multicultural community life in which not everyone has a good command of the Dutch language or is familiar with culturally determined behaviour."
"Citizens who, for whatever reason, cannot express themselves through language, must be able to use gestures."