A Brief Explanation of the Trinity - Where does this doctrine come from?
This doctrine comes from the New Testament with hints from the Old Testament. Four passages represent others.
First, at the baptism of Jesus, the Father, the Son, and the Holy Spirit were present. As soon as Jesus came up out of the water, "he saw the Spirit of God descending like a dove and lighting on him. And a voice from heaven said, ‘This is my Son, whom I love and with him I am well pleased’" (Matt. 3:16-17). The Father’s voice sounded from above and affirmed the Sonship of Jesus, and the Holy Spirit descended on him and empowered him.
Second, at the end of the same Gospel, Jesus is resurrected, and he commissions the disciples to go into all the world and preach the gospel. These two verses are part of the Great Commission, which Evangelicals take seriously. "All authority in heaven and on earth has been given to me. Therefore, go and make disciples of all nations, baptizing them in the name of the Father, the Son, and the Holy Spirit" ... (Matt 28:18-19).
This passage affirms that Jesus was granted all authority in heaven and on earth. This raises him high above a mere prophet. This passage also demonstrates Jesus’ early declaration of the Trinity. Therefore, this doctrine comes from him, originally.
For information on Jesus being granted all authority, see the beginning of this article.
Third, Christians believe that the entire New Testament is inspired. The Apostle Paul also affirms the doctrine of the Trinity. In his second letter to the Corinthians, he bids farewell to them: "May the grace of the Lord Jesus, and the love of God, and the fellowship of the Holy Spirit be with you all" (2 Corinthians 13:14). Thus, Jesus and the Holy Spirit exist with the Father, and from their heavenly vantage point they are able to communicate grace, love, and fellowship to the believers (cf. Ephesians 4:4-6).
Fourth, Peter the Apostle, the humble fisherman from Galilee, stood in Jesus’ presence when he spoke the Great Commission. Peter may not have fully understood Christ’s words then, but now he begins his epistle, under the inspiration of the Holy Spirit, restating the Trinitarian formula in his own words. He says that the people of God "have been chosen according to the foreknowledge of God the Father, through the sanctifying work of the Spirit, for obedience to Jesus Christ and sprinkling by his blood" (1 Peter 1:2). It is clear from this verse that each person of the Trinity has a function or role in the world. The Father chooses, the Spirit sanctifies, and Jesus redeems people with his blood that he shed on the cross.
To sum up, the doctrine of the Trinity was first stated in the Gospel of Matthew, both at the baptism of Jesus and in his Great Commission, in his own words. It is only natural, therefore, that the apostles would repeat his doctrine.
The readers should go to here and look up these verses: John 1:1-4, 14:26, 15:26, 16:13-14, 20:25-27; Acts 10:38 in connection with Romans 9:5, 15:13; 1 Corinthians 12:4-6; Colossians 2:9; Hebrews 1:3, 1:8, 1:10; Titus 2:13; 2 Peter 1:1; Jude 20-21. Each passage affirms the function and person of the Father, the Son, and the Holy Spirit, and sometimes just the Father and the Son.
This site has a list of other verses, including from both the Old and New Testaments.