Yes, but only when gender does not have any objective effect on the value of the work
(For example, it is unreasonable to pay female athletes the same as male athletes, because male athletes objectively make more money (due to much larger viewership/attendance) than female sports.)