General Motors Co. and Ford Motor Co. provided tepid outlooks that give little optimism for the year ahead to investors who are increasingly betting on electric-vehicle maker Tesla Inc. as the car company of the future.

Both Detroit giants are dealing with weakening demand and rising labor costs. On Wednesday, GM said earnings last year were dinged by a crippling 40-day strike that idled dozens of U.S. factories last fall, and said it didn’t expect operating profits to grow in 2020 due in part to anticipated slowdowns in...