Maya Kodnani, an ex-minister and aide to Chief Minister Narendra Modi, is the most senior figure so far convicted.
Thirty others received life sentences for their part in the killings in Naroda Patiya, a suburb of Ahmedabad.
The riots left more than 1,000 people, mostly Muslims, dead, and were among India's worst outbreaks of unrest.
The rioting began after 60 Hindu pilgrims died in a train fire blamed on Muslims in the town of Godhra.
Kodnani was not a minister at the time of the riots, but was appointed junior minister for women and child development by Mr Modi in 2007.
She quit her post when she was arrested in 2009 in connection with the massacre but remained a member of the state assembly.
On Wednesday she was convicted of murder, attempted murder and conspiracy. Thirty-one others were also found guilty of involvement in the case. One of those convicted has never been brought to justice and was tried in absentia.
Babu Bajrangi, a former leader of the hardline Hindu group Bajrang Dal, was found guilty on the same charges as Kodnani. He has been sentenced to remain in jail until he dies.
Announcing the sentences on Friday, Judge Jyotsna Yagnik named Kodnani as "a kingpin of riots" in the Naroda Patiya area.
"Communal riots are like cancer on constitutional secularism and the incident in Naroda Patiya was a black chapter in the history of the Indian constitution," the Press Trust of India quoted him as saying.
"Acts of communal [religious] violence are brutal, inhuman and shameful. It was a clear incident of human rights violation as 97 people were killed brutally within a day which included helpless women, children, aged persons.
"The climax of this inhuman and brutal act of violence was reflected in [the] murder of an infant, who was 20 days old," the judge said.
Following Kodnani's conviction on Wednesday, Gujarat's ruling Bharatiya Janata Party (BJP) government quickly distanced itself from her saying that she had not been a state minister at the time of the riots.
Correspondents, however, say her conviction is an embarrassment for Mr Modi who elevated her to ministerial office in 2007 despite being aware that her role in the riots was being investigated.
Gujarat assembly elections are due later in the year and the Congress party is bound to use the court ruling to criticise Mr Modi during the campaign.
Mr Modi, touted by some as a future prime minister, has been accused of not doing anything to stop the riots - a charge he has always denied.
Ninety-five bodies were found after the Naroda Patiya massacre - the worst of the Gujarat riots cases - on 28 February 2002. The bodies of two other people missing after the massacre and presumed dead were never found.
The trial began in August 2009 and charges were brought against 62 people. One of the accused died during the trial.
Correction: An earlier version of this story referred to the Bajrang Dal as a militant Hindu group.
An Indian court has sentenced a senior BJP party member to 28 years in jail for her part in murdering 97 people in the 2002 Gujarat religious riots.