We have been studying the bible about baptism and as we were searching through the Scriptures we came across this man called Philip, who was able to perform miracles and stuff, but we all know those gifts were given to the apostles only and before anyone can even receive it, an apostle has to lay hands on that person to transfer those gifts. So for Philip to be able to perform miracles and stuff, I want to ask if Philip was an apostle?
As you noted correctly, only the apostles were able to pass on gifts of the Holy Spirit to other men. "Now when the apostles who were at Jerusalem heard that Samaria had received the word of God, they sent Peter and John to them, who, when they had come down, prayed for them that they might receive the Holy Spirit. For as yet He had fallen upon none of them. They had only been baptized in the name of the Lord Jesus. Then they laid hands on them, and they received the Holy Spirit" (Acts 8:14-17). Even though Philip had been preaching in Samaria, two apostles were sent from Jerusalem to give the gifts. That tells us that Philip was not able to do this; thus, Philip was not an apostle.
Philip did receive the gifts from the apostles. "And the saying pleased the whole multitude: and they chose Stephen, a man full of faith and of the Holy Ghost, and Philip, and Prochorus, and Nicanor, and Timon, and Parmenas, and Nicolas a proselyte of Antioch: Whom they set before the apostles: and when they had prayed, they laid their hands on them" (Acts 6:5-6). Philip was one of the original seven deacons in the church in Jerusalem. Either at the point of being appointed deacons or sometime earlier these men were given gifts of the Holy Spirit. Right after this passage we see Stephen doing miracles. "And Stephen, full of faith and power, did great wonders and miracles among the people" (Acts 6:8).
There is one small misunderstanding. Miraculous gifts were given to the apostles directly from the Holy Spirit. "And they were all filled with the Holy Ghost, and began to speak with other tongues, as the Spirit gave them utterance" (Acts 2:4). However, it was not limited exclusively to the apostles. The direct bestowing of gifts, also called the baptism of the Holy Spirit, was rarely done. We only have two cases recorded for us. The second was of Cornelius and his household. "While Peter was still speaking these words, the Holy Spirit fell upon all those who heard the word. And those of the circumcision who believed were astonished, as many as came with Peter, because the gift of the Holy Spirit had been poured out on the Gentiles also. For they heard them speak with tongues and magnify God" (Acts 10:44-46). These people were not apostles and there is no record of them being able to pass on the gifts.
We can assume that Paul also was baptized in the Holy Spirit, since he was able to do miracles even though he did not see any of the other apostles until years after his conversion. And Paul was able to pass on the gifts to others. "Therefore I remind you to stir up the gift of God which is in you through the laying on of my hands" (II Timothy 1:6).