He invoked the Korean War-era Defence Production Act, which allows a president to force companies to make products for national defence.
Mr Trump said that "GM was wasting time" and action was needed to save American lives.
The US now has more than 100,000 cases of the virus, the most in the world.
But with approaching 1,600 fatalities, America's Covid-19 death toll still lags far behind Italy and China.
Mr Trump had previously said the defence order was not necessary, because companies were voluntarily converting their operations to help fight the spread of coronavirus.
But on Friday he said in a statement: "The virus is too urgent to allow the give-and-take of the contracting process to continue to run its normal course."
Earlier in the day he took to Twitter to complain that GM lowered the number of ventilators they had promised to deliver from 40,000 to 6,000 and had wanted "top dollar."
On Twitter, he criticised GM chief executive Mary Barra, saying things are "always a mess" with her at the helm of the Detroit-based auto manufacture.
What's the background to the row?
GM has been working with a medical device manufacturer, Ventec Life Systems, to build ventilators at the car-maker's plant in Kokomo, Indiana.
GM's factory in Warren, Michigan, will be used to make surgical masks, the Associated Press reported.
The White House had been due to announce the joint venture between the two companies on Wednesday until Trump administration officials baulked at the reported $1bn bill to taxpayers.
During the coronavirus task force briefing on Friday, the president said: "We're not looking to be ripped off on price."
Mr Trump also acknowledged he was "extremely unhappy" over the closing of GM's plant in Lordstown, Ohio.
The car-maker sold the factory last November, axing 1,400 jobs in a key presidential swing state.
Why the need for ventilators?
The medical machines which keep patients breathing are much in demand amid the coronavirus pandemic.
Louisiana's governor said on Friday that New Orleans could run out of ventilators by 2 April.
When Mr Trump was asked during Friday's briefing about his scepticism of New York's request for 30,000 ventilators, he said it was a "high" estimate.
"I don't think we'll need that much," the president said, adding that "there's a great chance" New York would not require so many.
But he emphasised the US would procure another 100,000 ventilators in the next 100 days.
"We're going to make a lot of ventilators," the president said. "If we don't need them, that's OK, we can help Italy, we can help the UK."
What's happening in New York?
The state has become the epicentre of the Covid-19 crisis in the US, with over 7,000 new cases announced on Friday alone by Governor Andrew Cuomo. There are a total of 44,000 patients thus far, and the death toll has climbed to 519, up from 385.
For the first time since 9/11 attacks, New York City has been preparing makeshift mortuary space, readying refrigerated lorries to help hospitals as the death toll rises.
Mr Cuomo again emphasised a need for more medical supplies, saying the state's peak is expected to come in 21 days and there was still a shortage of thousands of hospital beds and ventilators.
The governor also fired back at Mr Trump's suggestion that New York was exaggerating its need for 30,000 ventilators.
"I don't have a crystal ball, everybody's entitled to their own opinion - but I don't operate here on opinion," Mr Cuomo said.
"I operate on facts and on data and on numbers and on projections. All the projections say you could have an apex needing 140,000 beds and about 40,000 ventilators."
Is Trump handling the crisis well?
A Washington Post poll this week found 48% of Americans approve of the president's work and 46% disapprove - the highest approval and lowest disapproval ratings of his term.
But former US Vice-President Joe Biden, who looks likely to be Mr Trump's Democratic challenger in the November presidential election, on Friday said Mr Trump had "ignored the warnings for months" and "downplayed" the threat of the pandemic.
"It's one of the greatest failures of presidential leadership in our history," Mr Biden tweeted.
What's happening elsewhere in the US?
- Cable channel Fox Business has fired primetime television programme host Trish Regan after she claimed earlier this month the coronavirus crisis was a Democratic "scam" to impeach President Trump
- A physician and assistant professor at the University of Connecticut has been arrested after he was accused of intentionally coughing on colleagues
- The attorney general of Texas on Friday issued a legal opinion deeming gun stores "essential services" during the pandemic - firearm shops across the US have reported soaring sales thanks to Covid-19
- The owner of a restaurant in Naples, Florida, is searching for a mystery customer who quietly left a $10,000 cash tip to help out staff