Speaking at the Lahr airport in Baden-Württemberg before departing for Rome, the pope said, “I want to encourage the Church in Germany to continue to - with strength and confidence - take the path of faith which leads people to return to the roots, to the fundamental message of Christ.”
He said the future belonged to a Church which was convincing and infectious. “There will be small communities of believers – and there are some already – who shine out with their enthusiasm into the pluralist society and make others curious enough to seek out this light which gives life in abundance.”
Earlier on Sunday he had celebrated mass before around 100,000 of the faithful in Germany's Catholic heartland at the end of a visit that has disappointed many inside and outside the Church.
Mothers held up babies and toddlers for the pontiff to bless and kiss as he arrived in brilliant sunshine at an airfield in Freiburg in the specially-built "popemobile".
The 84-year-old pontiff said it was "moving" for him to celebrate the mass with so many.
He urged German Catholics to overcome their internal differences and remain faithful and obedient to Rome in "this time of danger and radical change" and a "crisis of faith".
"The Church in Germany will overcome the great challenges of the present and future, and it will remain a leaven in society, if the priests, consecrated men and women, and the lay faithful... work together in unity," he said.
And in remarks seemingly aimed at German Catholic groups clamouring for change such as Wir sind Kirche - We are Church - or Die Kirche von unten - The Church from below -, he said: "The Church in Germany will continue to be a blessing for the entire Catholic world: if she remains faithfully united with the successors of Saint Peter and the apostles."
During his stay, Benedict also met President Christian Wulff and Chancellor Angela Merkel and gave his first speech to a parliament, the German lower house or Bundestag.
The pope has used his trip to call German Catholics to order and hammer home his ultra-conservative credo on a range of issues such as artificial contraception, abortion, euthanasia and gay marriage.
He has warned against "lukewarm" Christians who he said were damaging the Church.