In 1 Corinthians 12:27-31:
Now you are the body of Christ, and each one of you is a part of it.
And God has placed in the church first of all apostles, second
prophets, third teachers, then miracles, then gifts of healing, of
helping, of guidance, and of different kinds of tongues. Are all apostles?
Are all prophets? Are all teachers? Do all work miracles? Do all
have gifts of healing? Do all speak in tongues? Do all interpret?
Now eagerly desire the greater gifts.
Apostles can promulgate new doctrine under divine inspiration as well as plant churches. They circulated letters that were to be read by the churches in their worship services. Among other things, theirs was a teaching ministry.
Prophets apply existing doctrine to specific individuals or situations, or foretell future events. In 1 Corinthians permission is given for two or three prophets to speak during a service.
Teachers (or pastor-teachers) teach.
These first three gifts are spoken of as the three most important, therefore the role they play in the life of the church is most important. Each is spoken of as contributing to the worship service.
Concerning apostles, see Colossians 4:16 -
After this letter has been read to you, see that it is also read in
the church of the Laodiceans and that you in turn read the letter from
Laodicea.
Concerning prophets, see 1 Corinthians 14:29 -
Two or three prophets should speak, and the others should weigh
carefully what is said.
As for teachers, their role was common in Judaism in synagogue. Noteworthy is Nehemiah 8, where Ezra the scribe read from the book of the law from morning to night for seven days as the people listened, so moved by contrition that they had to be told not to weep.
1 all the people came together as one in the square before the Water
Gate. They told Ezra the teacher of the Law to bring out the Book of
the Law of Moses, which the Lord had commanded for Israel.
2 So on the first day of the seventh month Ezra the priest brought the
Law before the assembly, which was made up of men and women and all
who were able to understand. 3 He read it aloud from daybreak till
noon as he faced the square before the Water Gate in the presence of
the men, women and others who could understand. And all the people
listened attentively to the Book of the Law.
4 Ezra the teacher of the Law stood on a high wooden platform built
for the occasion. Beside him on his right stood Mattithiah, Shema,
Anaiah, Uriah, Hilkiah and Maaseiah; and on his left were Pedaiah,
Mishael, Malkijah, Hashum, Hashbaddanah, Zechariah and Meshullam.
5 Ezra opened the book. All the people could see him because he was
standing above them; and as he opened it, the people all stood up. 6
Ezra praised the Lord, the great God; and all the people lifted their
hands and responded, “Amen! Amen!” Then they bowed down and worshiped
the Lord with their faces to the ground.
7 The Levites—Jeshua, Bani, Sherebiah, Jamin, Akkub, Shabbethai,
Hodiah, Maaseiah, Kelita, Azariah, Jozabad, Hanan and
Pelaiah—instructed the people in the Law while the people were
standing there. 8 They read from the Book of the Law of God, making it
clear[a] and giving the meaning so that the people understood what was
being read.
9 Then Nehemiah the governor, Ezra the priest and teacher of the Law,
and the Levites who were instructing the people said to them all,
“This day is holy to the Lord your God. Do not mourn or weep.” For all
the people had been weeping as they listened to the words of the Law.
10 Nehemiah said, “Go and enjoy choice food and sweet drinks, and send
some to those who have nothing prepared. This day is holy to our Lord.
Do not grieve, for the joy of the Lord is your strength.”
11 The Levites calmed all the people, saying, “Be still, for this is a
holy day. Do not grieve.”
12 Then all the people went away to eat and drink, to send portions of
food and to celebrate with great joy, because they now understood the
words that had been made known to them.
13 On the second day of the month, the heads of all the families,
along with the priests and the Levites, gathered around Ezra the
teacher to give attention to the words of the Law. 14 They found
written in the Law, which the Lord had commanded through Moses, that
the Israelites were to live in temporary shelters during the festival
of the seventh month 15 and that they should proclaim this word and
spread it throughout their towns and in Jerusalem: “Go out into the
hill country and bring back branches from olive and wild olive trees,
and from myrtles, palms and shade trees, to make temporary
shelters”—as it is written.[b]
16 So the people went out and brought back branches and built
themselves temporary shelters on their own roofs, in their courtyards,
in the courts of the house of God and in the square by the Water Gate
and the one by the Gate of Ephraim. 17 The whole company that had
returned from exile built temporary shelters and lived in them. From
the days of Joshua son of Nun until that day, the Israelites had not
celebrated it like this. And their joy was very great.
18 Day after day, from the first day to the last, Ezra read from the
Book of the Law of God. They celebrated the festival for seven days,
and on the eighth day, in accordance with the regulation, there was an
assembly.
With the passing of the apostolic age and the rarity of true prophets in our times, this leaves the gift of teacher as the most important, hence establishes its centrality in worship.
However, I would stress that the same passage that names some gifts as more important than others also cautions against spiritual pride and proclaims that all the gifts are essential to strengthen the Church.