The attacks followed a Cairo church bombing in December and came weeks ahead of a planned visit by Catholic Pope Francis intended to show support for the country's Christian minority.
The first bombing struck the Mar Girgis church in the city of Tanta north of Cairo, killing 27 people, the health ministry said.
Emergency services had scrambled to the scene when another bombing rocked the Saint Mark's church in Alexandria where Coptic Pope Tawadros II had been leading a Palm Sunday service.
Eleven people were killed in that attack, which the interior ministry said was caused by a suicide bomber who blew himself up when police prevented him from entering the church.
The ministry said Tawadros was unharmed, and a church official said he had left the church before the bombing.
At least 78 people were wounded in Tanta and another 40 wounded in Alexandria, the health ministry said.
Egyptian officials denounced the violence as an attempt to sow divisions in the country, while Francis sent his "deep condolences" to Tawadros.
ISIS claimed that its "squads" carried out both attacks, in a statement by its self-styled Amaq news agency published on social media accounts.
Images broadcast by private television stations showed bloodstains smearing the whitewashed walls of the church in Tanta next to shredded wooden benches.
"The explosion took place in the front rows, near the altar, during the mass," General Tarek Atiya, the deputy to Egypt's interior minister in charge of relations with the media, told AFP.
"I heard the blast and came running. I found people torn up... some people, only half of their bodies remained," said Nabil Nader, who lives in front of the Tanta church.
The worshippers had been celebrating Palm Sunday, one of the holiest days of the Christian calendar, marking the triumphant entrance of Jesus to Jerusalem.
Pope prays for victims
Francis, who is due to visit Cairo on April 28-29, offered prayers for the victims.
"Let us pray for the victims of the attack unfortunately carried out today," he said in an Angelus prayer.
"May the Lord convert the heart of those who sow terror, violence and death and also the heart of those who make weapons and trade in them."
Copts, who make up about one tenth of Egypt's population of more than 92 million and who celebrate Easter next weekend, have been targeted by several attacks in recent months.
Jihadists and Islamists accuse Copts of supporting the military overthrow of Islamist president Mohamed Morsi in 2013, which ushered in a deadly crackdown on his supporters.
In December, a suicide bombing claimed by IS killed 29 worshippers during Sunday mass in Cairo.
The group later released a video threatening Egypt's Christians with more attacks.
The bombing of the church within a compound that also holds the seat of the Coptic papacy was the deadliest attack against the minority in recent memory.
A spate of jihadist-linked attacks in Egypt's restive Sinai Peninsula, including the murder of a Copt in the city of El Arish whose house was also burned, have led some Coptic families to flee their homes.
About 250 Christians took refuge in the Suez Canal city of Ismailiya after IS released a video in February calling for attacks on the religious minority.
Reacting before the second bombing in Alexandria, Egyptian Foreign Ministry spokesman Ahmed Abu Zeid called the attack in Tanta "a failed attempt against our unity".
"Terrorism hits Egypt again, this time on Palm Sunday," he tweeted.
String of attacks
Prime Minister Sherif Ismail also condemned the attack, stressing Egypt's determination to "eliminate terrorism".
The Cairo-based Al-Azhar, an influential Sunni Muslim authority, said it aimed to "destabilise security and... the unity of Egyptians".
Egypt's Copts have endured successive attacks since Morsi's ouster in July 2013.
More than 40 churches were attacked nationwide in the two weeks after the deadly dispersal by security forces of two pro-Morsi protest camps in Cairo on August 14, 2013, Human Rights Watch said.
Amnesty International later said more than 200 Christian-owned properties were attacked and 43 churches seriously damaged, adding that at least four people were killed.
President Abdel Fattah al-Sisi, who as then army chief helped remove Morsi, has defended his security forces and accused jihadists of attacking Copts in order to divide the country.
In October 2011, almost 30 people -- mostly Coptic Christians -- were killed after the army charged at a protest outside the state television building in Cairo to denounce the torching of a church in southern Egypt.
In May that year, clashes between Muslims and Copts left 15 dead in the working-class Cairo neighbourhood of Imbaba where two churches were attacked.
A few months earlier, the unclaimed bombing of a Coptic church killed more than 20 people in Egypt's second city of Alexandria on New Year's Day.