There was a hefty fight to establish it, since it doesn't say in the Constitution that Congress can start a bank, and a whole bunch of people thought it would be helping out people who were already rich a whole lot more than anyone else. Those objections had some validity, but both houses of Congress passed the bill, and the First Bank of the United States came into being in 1791. Unfortunately for the first bank, its charter lasted twenty years, and in 1811 there were a whole lot more people who had those earlier objections, and it took five years to assuage their doubts and begin a Second Bank of the United States.
In 1817, Maryland passed a law taxing any bank that did not first obtain approval from the state government, which, fair enough, the Second Bank of the United States hadn't done before it set up a Baltimore office. James William McCulloch, the head of that branch, refused to pay, particularly since there weren't any other banks hit by the law and there was no justification for the tax, and appealed after the Maryland Supreme Court ruled in favor of the state in 1818.
There were a few issues at stake here.
1. Can Congress create a bank?
2. Are the states the highest authority, since they ratified the Constitution, thereby giving it authority?
3. Can Congress exercise a power not explicitly in the Constitution?
4. Is the Necessary and Proper clause limited to essential government functions, or broader?
Chief Justice John Marshall resolved all four questions in favor of the bank.
Congress created the First Bank of the United States, after a great deal of debate by extremely distinguished legal minds. They didn't find a problem, Marshall said, and therefore history backs a bank.
The states ratified the Constitution through the people of each state, from whom the federal government derives its governing power. Therefore, the people are sovereign, not the state.
Marshall admitted that the Constitution does not explicitly say Congress may establish a bank, but the power was implied by its collective authorities.
The Congress shall have Power ... To make all Laws which shall be necessary and proper for carrying into Execution the foregoing Powers, and all other Powers vested by this Constitution in the Government of the United States, or in any Department or Officer thereof.Marshall contended that the clause would be quite insufficient, and the government hamstrung, if its powers were limited to activities listed in the Constitution and immediate relatives. Any action intended to serve a power of the government and not explicitly prohibited was permitted. Therefore, the state of Maryland was not taxing an unconstitutional institution imposed on its sovereignty by a lower or equal power, and the tax was not constitutional.