Mrs Merkel said she wanted friendly relations with both countries as well as Russia but Europe now had to "fight for its own destiny".
It follows the G7's failure to commit to the 2015 Paris climate deal, talks Mrs Merkel said were "very difficult".
President Trump has said he will make a decision in the coming week.
"The times in which we could completely depend on others are on the way out. I've experienced that in the last few days," Mrs Merkel told a crowd at an election rally in Munich, southern Germany.
The BBC's Damien McGuinness, in Berlin, says the comments are a sign of growing assertiveness within the EU.
The relationship between Berlin and new French President Emmanuel Macron had to be a priority, Mrs Merkel said.
Earlier the German leader had described the "six against one" discussion about the Paris Accord during the G7 summit in Sicily as "very difficult, not to say very unsatisfactory".
keyboard shortcuts: V vote up article J next comment K previous comment