"Six accused persons have been found guilty, three have been ordered death sentences and two will serve life imprisonment," judge Sonia Gokani told the court in Ahmedabad, the main city of Gujarat state.
The sixth man was jailed for five years.
On September 24, 2002, two guerrillas later accused of belonging to the Jaish-e-Mohammad Kashmiri separatist group stormed the Akshardham temple in Gandhinagar, the state capital.
Dressed in army uniforms, they killed 33 people and wounded 81 in a 14-hour siege that ended when security forces killed the attackers.
"We got justice today," said 54-year-old Raman Patel who lost three family members in the attack.
The court awarded the death penalty to the main accused, Chand Khan, Abdul Qayoom and Azam Ajmeri.
Mufti Abdul Miyaan and Mohammed Aalim were jailed for life and Altaf Mallik for five years for their roles in planning the attack.
All had pleaded not guilty.