Banking, along with so much else, was invented in the twelfth century. The economy was a money economy, with gifts to monasteries, purchases of horses, and peasant rents all calculated in pounds, solidi (shillings), and pence. The division of a pound into 20 solidi, each of which was divided into 12 pence, went back to late Roman times and was indeed the system of currency used in Britain until the 1980s.
A pound was, quite literally, a pound of silver. As you can imagine, walking around with 100 pounds of silver, because one was going to make a generous gift or a substantial purchase, was not going to work very well. Even bigger purchases would have been impossible if one had to pay in silver. They used coins for small purchases, little silver pennies smaller than a dime as well as copper pennies, but for a bigger purchase one needed to write a check. (There was not enough gold in Europe for it to be a normal form of coinage.)
For checks one needs banks. The first banks were "benches," where money-changers sat at trade fairs (click here for more on these fairs), so that if someone came with the currency of one city in his pocket, he could get it turned into the local currency. Every major city had its own solidi, which varied in value depending on the purity of the silver in them (everyone worked a little "base" metal into the silver at some point), so local merchants wanted local currency, to make sure they were getting what they were owed.
The money-changers had strong-boxes and lockups, to protect their coins, and they would take deposits, for a fee, so that someone coming to a trade fair with a lot of cash wouldn't have to worry about pickpockets. Soon the bankers also were arranging short-term loans, so someone arriving with goods to sell could get some money upfront to pay for food and lodging until he had sold his goods.
The image is a silver penny, from thirteenth-century Burgundy.
Officially, according to the Old Testament, one was not supposed to charge one's "brother" interest. The easiest way around it was for the bankers to be Jews, since neither they nor the Christians considered each other "brothers." Alternately (and the Italian bankers became very good at this), one could charge a "late penalty fee" (defined as not-interest) or fiddle with the exchange rates, so that one borrowed money denominated in one currency and paid it back in another.
Very quickly banking houses became established, with branches in all the major commercial centers. They would honor each other's checks, so that one could have hundreds of pounds in one's "account" without necessarily having any silver there at all.
We now, in the twenty-first century, tend not to think about how money works. Money works because everyone tacitly agrees to believe in it, and things were no different in the Middle Ages. Consider. You go to the shoe store and give the clerk a piece of paper (a check) on which you have essentially written, "This piece of paper is worth $86.98." It works because you signed it and it has a picture of a flower. In return they give you real shoes. But how about "real" money? you say. You mean those green and gray rectangles of paper with a dead guy's picture and some little colored threads? maybe worth a nickel in actual value?
Money is anything we want it to be. There have been countries that use counterfeit American currency, known to be counterfeit, because it's what they have. In the concentration camps, they used pieces of bread. As long as experts, the bankers, tell you this money-object has a value, and horses and clothes and electronic devices and everything else are also defined in terms of set values, it all works.