General Motors Co. plans to cut up to 14,800 jobs in the U.S. and Canada and end production at several North American factories, marking the auto maker’s first significant downsizing since its bankruptcy last decade as the company tries to adjust to weak sedan sales.

The moves—affecting plants in Michigan, Ohio and Canada—would reduce GM’s annual costs by $4.5 billion by the end of 2020, freeing up money to invest in electric and self-driving vehicles. The decision, though, was called “callous” by the main auto workers union...