This question has been asked a few times in classes that I have taught over the years and I thought it would be good to share Joseph Fielding Smith’s thoughts on this question. The following is from Answers to Gospel Questions, volume 2, p. 132:
The Authority of Jesus
Question: “Where and from whom did Jesus obtain his authority of the Holy Priesthood? Did he bring it with him? If not, who ordained him?”
Answer: This question has been received several times, and the information is received that it has been discussed many times in priesthood classes and the auxiliary organizations, which has been a waste of valuable time.
How long are members of the Church going to waste their time on such needless questions? Does any member in any of these classes question the divine authority of our Savior? Is he not the Only Begotten Son of God in the flesh? Did he not, by authority of the priesthood, build worlds long before he was born in Bethlehem and took a physical body? Is it not our Redeemer who before being born in the flesh, led Israel and gave the law and the authority to Moses and the prophets of old? What was the witness that John the Apostle, bore of him?
In the beginning was the Word, and the Word was with God, and the Word was God.
The same was in the beginning with God.
All things were made by him; and without him was not any thing made that was made.
In him was life; and the life was the light of men.
And the light shineth in darkness; and the darkness comprehend it not. (John 1:1-5. See also Hebrews 1:1-2; Moses 1:32-33.)
Jesus said unto her, I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live:
And whosoever liveth and believeth in me shall never die.
Believest thou this? (Ibid., 11:25-26.)
Well, if Christ is God, then the priesthood comes from him; it is centered in him. What man had authority to give God the Holy Priesthood? Jesus said, in answer to the question by Thomas, “I am the way, the truth, and the life: no man cometh unto the Father, but by me.” (Ibid., 14:6.) Again the Savior to the Prophet Joseph Smith:
Verily, thus saith the Lord: It shall come to pass that every soul who forsaketh his sins and cometh unto me, and calleth on my name, and obeyeth my voice, and keepeth my commandments, shall see my face and know that I am;
And that I am the true light that lighteth every man that cometh into the world;
And that I am in the Father, and the Father in me, and the Father and I are one—
The Father because he gave me of his fulness, and the Son because I was in the world and made flesh my tabernacle, and dwelt among the sons of men.
I was in the world and received of my Father, and the works of him were plainly manifest. (D. & C. 93:1-5. See also Section 88:4-13.)