President Donald Trump on Friday ordered General Motors Co. to make ventilators for coronavirus patients, invoking a federal law that gives him vast powers over industry in crises, just as the company is within weeks of starting production on the equipment.