In every responsibility in the church whether a primary teacher, a bishop, or an Apostle they are called of God by the same prophecy and are given the authority to do what they do by the laying on of hands by those who already have the authority.
Isn't that wonderful!? However, who gives us the authority to call an apostle of the Lord? Where did it come from? Jesus Christ himself.
As shown in the picture above, Jesus Christ called and ordained apostles. He gave them the authority by the laying on of the hands. Now that these apostles had the authority of Christ, they were now authorized to preach His Gospel and administer in the ordinances thereof, such as baptism and giving the Holy Ghost by the laying on of hands as well. They were also able to give that power and authority to others that were worthy of it.
That is why we have a direct line of authority to Jesus Christ. I know that God truly sent these glorious heavenly messengers to confer Gods authority upon the Prophet Joseph Smith thus fulfilling both in ancient times and in modern times the statement written in Matthew 16:19, "And I will give unto thee the keys of the kingdom of heaven: and whatsoever thou shalt bind on earth shall be bound in heaven: and whatsoever thou shalt loose on earth shall be loosed in heaven".
Whenever Christs church is on the earth, his authority will be on the earth and within that very church.