The Supreme Court on Monday agreed to decide whether U.S. law banning workplace discrimination on the basis of sex protects gay and transgender workers, as the conservative-majority court waded into a fierce dispute involving a divisive social issue.