Six weeks before this revelation was given, the Quorum of the 12 Apostles was organized. They were about to leave on their first mission to the east and came to Joseph, telling him that they felt they had not been equal to their calling, that they had done many things wrong, and had been light minded and vain. As they were preparing to leave and not knowing when they would return, they tell Joseph they have sought forgiveness from the Lord and desire a revelation. As a result, Joseph receives this great revelation on the priesthood. This revelation has been the foundation for the organization and function of the church. It's inspiration can be seen in how efficiently the church works, and especially in how amongst the 1st presidency and 12, there can be no seeking of power or office. The way the priesthood is organized guarantees that the relationship of the quorums and their own responsibilities do not impede each other and also guarantee a smooth succession of leadership. For example, the 1st Presidency is the highest quorum of the church. The next highest is the quorum of the the 12, and the next is the 1st quorum of the seventy. When members of these quorums are ordained, they all receive the same keys of authority making them equal to each other. However the 1st presidency presides over them all. The 12 preside over the seventy. The reason they are considered equal is, when the prophet dies, the quorum of the 1st presidency is dissolved and the 12 then preside over the church. If the 1st presidency and the 12 were killed or no longer existed for some reason, then the seventy would preside and be able to reorganize those quorums. Each quorum has a presiding officer.
In this revelation, the Lord indicates that the 1st presidency, the 12 and 70 are responsible for all of the spiritual matters of the church and the teaching and preaching of the gospel. The 12 have the responsibility of bearing witness of the name of Christ throughout the world. Bishoprics are the presidency of the Aaronic Priesthood and fall under the direction of the presiding officers of the Melchizedek Priesthood. The Aaronic Priesthood is responsible for all of the temporal affairs. So at the general authority level of the church, the presiding bishopric is responsible for handling the tithes and offerings, the building of churches and temples, the grounds, etc. At the local level, the stake president presides over the wards, being the local president of the Melchizedek Priesthood, while the Bishops preside over the wards and are the presidents of the Aaronic Priesthood in their ward.
All of the decisions of these quorums must be unanimous, and can only be successful if they are are "made in all righteousness, in holiness, and lowliness of heart, meekness and long suffering, and in faith, and virtue, and knowledge, temperance, patience, godliness, brotherly kindness and charity."
Also in this revelation, the duties of elders, priests, teachers and deacons are given. It is a remarkable revelation. It doesn't seem likely to me that Joseph Smith would have been able to just write this out in one sitting and come up with so remarkable an organization, one that would work regardless of whether the church had a few thousand members like it did at the time, or the millions it does now.