Thousands of people crammed into a sports stadium for the service on Saturday evening in the town of Moshi near Mount Kilimanjaro, with many getting crushed after the pastor called them to be anointed with "blessed oil."
The pastor was arrested later for his role in the incident as he sought to leave the country, officials said.
"Twenty people died and 16 others were injured in the incident," Moshi district commissioner Kippi Warioba told Reuters by telephone. Five of the dead were children, he said.
"The stampede occurred when the worshipers were rushing to get anointed with blessed oil," Warioba said.
Pastor Boniface Mwamposa had been drawing huge crowds by promising prosperity and cures for diseases to worshipers who step in what he calls "blessed oil" during his services.
He was arrested on Sunday in Tanzania's commercial capital, Dar es Salaam, as he attempted to flee the country, home affairs minister George Simbachawene said on Sunday.
"Mwamposa tried to flee after this incident, but we arrested him in Dar es Salaam ... he will be held accountable for causing this tragedy," the minister said.
According to the minister, the stampede took place after the pastor instructed worshipers, who numbered some 10,000, to rush to one side of the stadium all at once to get anointed.
Authorities fear the death toll could rise due to the size of the crowd and poor lighting when the stampede occurred.
"The incident took place at night and there were many people, so there is a possibility that more casualties could emerge. We are still assessing the situation," Warioba said.
Tanzania has seen a rise in the number of "prosperity gospel" pastors in recent years, who promise to lift people out of poverty and perform what they call miracle cures.Thousands of people in the nation of 55 million flock to Pentecostal churches, whose main source of income is "tithe," the 10% or so of income that worshipers are asked to contribute.