The Paris labour relations tribunal found that the five-star Park Hyatt Paris-Vendome and the company that provides its cleaning crew lacked sufficient safeguards against such incidents.
It ordered the Park Hyatt to pay the cleaner 20,000 euros, while the service provider must pay 27,000 euros over the incident involving a member of the entourage of a Qatari prince.
The cleaner, a Guinean national who is now aged 33 and requested anonymity, was fired in January 2011 for refusing to transfer to another hotel after reportedly attempting suicide and taking sick leave on several occasions for "post-traumatic stress".
The tribunal ruled that her dismissal was "tantamount to discrimination".
The hotel was also faulted for failing to alert the police on the evening of the assault, "which allowed the aggressor to flee" the following day.
"It's a first in the area of sexual harassment," the cleaner's lawyer Maude Beckers told AFP.
The Park Hyatt said it was in "total disagreement" with the ruling and would appeal.
The ruling is "based on multiple untruths and shows that the tribunal was manipulated," regional vice president Michel Jauslin told AFP.