SAN FRANCISCO—In the race to turn robot taxis into a business, the country’s largest auto maker and a young rival upstart have taken to the streets here, believing the hilly city will help them catch up to Google parent Alphabet Inc.

On Tuesday, General Motors Co., for the first time since acquiring driverless-car software company Cruise Automation, demonstrated its autonomous Chevrolet Bolt electric cars to journalists with test rides.

Separately,...