He said a deal could come in the next four weeks, but added some sticking points remained.
The Chinese echoed the optimism, with President Xi Jinping touting substantial progress, according to the Chinese state news agency Xinhua.
The US and China have been in talks since December trying to end a trade war that is hurting the global economy.
Mr Trump said the US and China had agreed on “a lot of the most difficult points” but that “we have some ways to go”.
He was speaking from the White House, before a meeting with Chinese Vice Premier Liu He.
The US president said if there was a deal, he would hold a summit with President Xi.
“This is an epic deal, historic – if it happens,” said Mr Trump.
“This is the Grand Daddy of them all and we’ll see if it happens. It’s got a very good chance of happening.”
Sticking points in negotiations in recent weeks have included how fast to roll back tariffs and how a deal would be enforced.
Mr Trump suggested at the press conference that some of these persisted.
He said it would be tough for the US to allow trade to continue with China in the same way as in the past, if a deal did not materialise.
The world’s two largest economies imposed tariffs on billions of dollars worth of one another’s goods over the past year.
Negotiations between them have continued since a trade truce was agreed in December, but have at times been rocky.
The BBC’s China correspondent Robin Brant said that both sides were – yet again – giving conflicting signals.
Mr Liu said the US and China had reached a new consensus on important issues like the text of the economic and trade agreement, Xinhua reported.
While that echoed Mr Trump’s comments, US Trade Representative Robert Lighthizer sounded more cautious. He said there were still some major issues left in trade talks, according to reports.
Mr Brant said there was clearly still significant distance between the two sides on the crucial issue of enforcement.
The US accuses China of stealing intellectual property from American firms, forcing them to transfer technology to China.
Washington wants Beijing to make changes to its economic policies, which it says unfairly favour domestic companies through subsidies and other support, and wants China to buy more US goods to rein in a lofty trade deficit.
China accuses the US of launching the largest trade war in economic history, and is unlikely to embrace broader structural changes to its economy.
Failure to achieve a deal may see the US more than double the 10% tariffs on $200bn (£153bn) of Chinese goods and impose fresh tariffs.
Mr Trump has in the past threatened to tax all Chinese goods going into the US.
The US has already imposed tariffs on $250bn worth of Chinese goods, and China has retaliated with duties on $110bn of US products.
The damaging trade war has already cast a shadow over global trade and the world economy.