The death sentence was imposed after the three were convicted of robbery with violence.
A further 25-year sentence for stripping the woman was suspended due to the death penalty.
The incident was recorded and shared widely on social media three years ago, sparking nationwide protests.
Hundreds of women, some in tight fitting clothes, marched through Nairobi, rallied by the hash tag #MyDressMyChoice.
Chief magistrate Francis Andayi said that those convicted had taken part in a "senseless and uncouth attack that they seemed to enjoy because they were cheering as they stripped the woman", the privately owned Daily Nation newspaper reports.
This episode was part of a wave of sexual assaults in Nairobi during 2014.
Death sentence may not be carried out
Anne Soy, BBC News, Nairobi
Most people have been in support of today's ruling, however, one man told the BBC that the sentence was unfair and that women need to dress according to Kenyan traditions.
Cases of sexual assault of this nature have greatly reduced recently. We have not had any reported cases of harassment for alleged provocative dressing since 2014.
And while death penalties are still passed in Kenyan courts, no executions have actually been carried out since 1987. Last year President Uhuru Kenyatta commuted all death sentences in the country to life imprisonment.
So the three men may be set for a long time of reflection in prison.