Greste and Egyptian-Canadian Mohamed Fadel Fahmy each got seven years, while producer Baher Mohamed received two sentences -- one for seven years and another for three years.
Eleven defendants who were tried in absentia, including a Dutch woman journalist and two other foreign journalists, were given 10-year sentences.
The trial had provoked an international outcry and raised fears of growing media restrictions in Egypt.
"The Australian government is shocked at the verdict," Canberra's Foreign Minister Julie Bishop said.
"It is hard to credit that the court in this case could have reached this conclusion," she added.
"The Australian government simply cannot understand it based on the evidence that was presented in the case."
Al-Jazeera chief Mustafa Sawaq said in Doha: "We condemn... This kind of unjust verdict. ... We are shocked."
Greste's brother Andrew said he was devastated.
"We are devastated. It is definitely not what we were expecting. I was hoping for acquittal... We will continue to fight for his freedom," he said.
He said Dutch journalist Rena Netjes, tried in absentia, "did not get a fair trial".
Of the six defendants in custody along with Greste, Fahmy and Mohamed, four were sentenced to seven years and two were acquitted.
"They will pay for this, they will pay for this. I promise!" shouted Fahmy, wearing white prison uniform, after the verdict was announced.
The defendants can appeal, and a presidency official said that President Abdel Fattah al-Sisi "legally can't (pardon them)... A pardon can be given only after the final court ruling".
The verdict comes a day after US Secretary of State John Kerry called for freedom of the press to be upheld as he made a surprise visit to Cairo.
