Foreign Minister Jorge Arreaza tweeted a statement saying Ambassador Daniel Kriener interfered in Venezuela's internal affairs and allied himself with "extremist sectors" of the opposition.
Venezuela considers it unacceptable that a foreign diplomat would take on "a public role more appropriate to that of a political leader," the government statement said. It gave Kriener 48 hours to leave the country.
Kriener and some other diplomats greeted Guaido when he returned to Venezuela on Monday and vowed to intensify his campaign to topple the government of President Nicolas Maduro.
At the country's main airport, Kriener spoke to journalists and said he hoped the leader of the National Assembly would be safe. There were concerns that the opposition leader might face detention, but Maduro's government did not move against him.
After the expulsion order, German Foreign Minister Heiko Maas said he had decided to recall Kriener to Berlin for consultations.
"This is an incomprehensible decision that aggravates the situation and does not contribute to de-escalation," Maas said in a statement. "Our, Europe's, support for Juan Guaido is unbroken. Ambassador Kriener is doing excellent work in Caracas, including in recent days."
In a speech at the National Assembly, Guaido condemned the expulsion of the ambassador.
"They're threatening an important European country that is providing humanitarian help to Venezuela," he said.
Guaido also said Maduro had effectively been ignoring him since his return to Venezuela in hopes that his political momentum will fade. On Tuesday, Maduro belittled his opponents as "opportunists and cowards," but did not mention Guaido by name.
The adversaries have announced rival demonstrations on Saturday as they seek to motivate supporters.
A U.S. journalist working in Venezuela, meanwhile, was taken away by security forces from his Caracas apartment early Wednesday, according to witnesses and colleagues. Executives at a Miami TV station said hours later that freelance journalist Cody Weddle, who reported for the station, had been freed and taken to the airport for a flight to the U.S.
The U.S. State Department said earlier that it was deeply concerned about the reported detention of a U.S. journalist. Venezuelan officials did not comment on the case.
Venezuela broke off diplomatic ties with neighboring Colombia after Maduro's security forces blocked a Feb. 23 attempt by Guaido and allies to bring humanitarian aid into Venezuela from Colombia and Brazil. He also broke diplomatic relations with the United States after it recognized Guaido as interim president in late January, initially giving American diplomats 72 hours to leave the country. The Trump administration refused to obey Maduro's order.
The U.S., Germany and some 50 other countries consider Maduro's re-election invalid and have urged him to step aside so the country can prepare for elections. Maduro says he is the target of a U.S.-backed coup plot.
The U.S. is pursuing new diplomatic and economic initiatives to support Guaido's bid for a transitional government in Venezuela, National Security Adviser John Bolton said Wednesday.
"The United States is putting foreign financial institutions on notice that they will face sanctions for being involved in facilitating illegitimate transactions that benefit Nicolas Maduro and his corrupt network," Bolton said in a statement.
The Trump administration has imposed oil sanctions in Venezuela as well as sanctions on high-ranking members of the Venezuelan security forces and other senior officials. The U.S. visas of other Venezuelan officials and their relatives have been revoked.