SACRAMENTO, Calif.—California Democrats are poised to pass landmark employment legislation over the objections of two of the companies that would be most affected: Silicon Valley ride-sharing giants Uber Technologies Inc. and Lyft Inc.

The bill already passed the State Assembly 59-15 and is expected to be voted on in the state Senate before the legislative session ends on Friday, possibly as soon as Monday night.

Democratic...