After Gedeon had initially filed a complaint involving president of the Central Council of Jews, Josef Schuster, judges in the Berlin court rejected it.
Schuster had accused Gedeon in a media report early last year of denying the genocide of the Jews by the Nazis, referring to books written by the AfD politician.
But 70-year-old Gedeon, a member of the state parliament in Baden-Württemberg, rejected the accusation.
The court justified its decision by stating that Gedeon had questioned individual aspects of the Holocaust, such as the number of victims and the classification as crimes against humanity in contrast to war crimes.
It is a crime to deny the Holocaust in a dozen European countries, including Germany and Austria.
Gedeon had filed a lawsuit against Schuster because he considered the term 'Holocaust denier' to be an unjustified accusation. "The verdict is surprising," the 70-year-old said afterwards, accusing the court of giving "special treatment" to Schuster. He said that he would wait for their written explanation of the verdict before considering an appeal.
Schuster on the other hand welcomed the court's ruling “in times when aggressive anti-Semitism is gaining a stronger foothold in Germany."
Gedeon had described the Holocaust in a book published in 2012 as “certain infamous actions,” and called Holocaust deniers dissidents.
In the summer of 2016, the comments led to serious infighting at the top of the AfD, with co-chairman Jörg Meuthen threatening to leave the party if Gedeon was not expelled.
The party chapter in Baden-Württemberg meanwhile claimed Meuthen had decided upon Gedeon's guilt before they had had a chance to properly look into the incident.
It's not the first time a politician from the far-right party has been in hot water over bringing up taboos in a country that has long struggled to deal with the legacy of the Nazi era and the Holocaust.
Leading AfD member Björn Höcke provoked outrage in January last year when he labelled Berlin's Holocaust Memorial a "monument of shame in the heart of the capital" and urged Germans to focus less on their Second World War guilt.
AfD chief Alexander Gauland had also last year urged Germans to be proud of their veterans from two world wars.