As the page Court Order to Block Access from Germany explains, the blocking has to do with differences between the EU and the USA related to the rules governing copyright:
- in Germany, copyright lasts until 70 years after the author's death;
- in the USA, for works published before 1978 "the maximum copyright duration is 95 years from the date of publication, if copyright was renewed during the 28th year following publication" (quoted from "Copyright in the United States" on Wikipedia).
In fact, the rule that applies in Germany applies in all of the EU because it follows from the Copyright Duration Directive and the Copyright Term Directive.
Certain works by Heinrich Mann (who died in 1950), Thomas Mann (who died in 1955) and Alfred Döblin (who died in 1957) were still copyrighted in the European Union when they entered the public domain in the USA, where Project Gutenberg is based. The German publisher S. Fischer Verlag, who published these authors' works, sued Project Gutenberg, so they would remove eighteen books by these authors [1] from their archive. Project Gutenberg did not want to remove those books; this resulted, in February 2018, in blocking access to Project Gutenberg for all persons located in Germany.
What this implies is that you can't sell ebook versions of those eighteen books in Germany (unless you get a licence from S. Fischer Verlag). The lawsuit does not make it illegal to sell ebook versions of works that are in the public domain in the European Union. In other words, it is not the availability on Project Gutenberg that makes specific books illegal to sell in Germany, it is the copyright protection that still applies to certain books in the European Union. If you find other books on Project Gutenberg whose copyright has expired in the EU, it should be perfectly legal to sell them as ebooks in Germany.
[1] The lawsuit concerns the following books:
- Flöten und Dolche: Novellen by Heinrich Mann (1905),
- Professor Unrat, oder, Das Ende eines Tyrannen by Heinrich Mann (1906),
- Flaubert und die Herkunft des modernen Romans by Heinrich Mann (1917),
- Der Vater by Heinrich Mann (1917),
- Der Untertan by Heinrich Mann (1918),
- Die Ehrgeizige: Novelle by Heinrich Mann (1920),
- Der kleine Herr Friedemann: Novellen by Thomas Mann (1897),
- Buddenbrooks: Verfall einer Familie by Thomas Mann (1901),
- Königliche Hoheit: Roman by Thomas Mann (1901),
- Gladius Dei; Schwere Stunde by Thomas Mann (1903),
- Tristan by Thomas Mann (1903),
- Tonio Kröger by Thomas Mann (1903),
- Der Tod in Venedig by Thomas Mann (1912),
- Die Ermordung einer Butterblume und andere Erzählungen by Alfred Döblin (1913),
- Die drei Sprünge des Wang-lun: Chinesischer Roman by Alfred Döblin (1916),
- Die Lobensteiner reisen nach Böhmen: Zwölf Novellen und Geschichten by Alfred Döblin (1917),
- Wallenstein. 1 (of 2) by Alfred Döblin (1920),
- Wallenstein. 2 (of 2) by Alfred Döblin (1920),
Disclaimer: I am not a lawyer and the above is not legal advice.
Update, March 2021: The works of Heinrich Mann are now in the public domain (see Viele neue Werke sind ab diesem Jahr gemeinfrei by Anna Biselli, 05.01.2021), but Project Gutenberg still blocks visitors from Germany and will probably continue to do so until the works of Alfred Döblin enter the public domain in 2028.
Update, October 2021: According to a new statement by Project Gutenberg, the site no longer blocks users from Germany:
In October 2021, the parties reached a settlement agreement. Under the terms of the agreement, Project Gutenberg eBooks by the three authors will be blocked from Germany until their German copyright expires.
Under the terms of the settlement, the all-Germany block is no longer in place. Other terms of the settlement are confidential.
Further details can be found in the statement linked above. As a user located in Germany, I can confirm that my IP address is no longer being blocked by the gutenberg.org domain.