I remember reading in one of the Republic Commando books about Besany Wessen doing some investigating within the Treasury, but don't remember it ever leading to anything except the Skirata Clan discovering some information about the Republic having fronts for using/moving money around. Is it ever mentioned where Palpatine received the funding to create and build an army? I can't imagine the Supreme Chancellor paying for an entire army with just his salary...
Sidious first convinces Damask that the Republic must lose its faith in the Jedi.
Sidious took a moment. "We will have to exploit their vanity and blind obedience to the Republic," he said with greater confidence, and as if the truth of it should be obvious. "They must be made to appear the enemies of peace and justice rather than the guardians."
Damask is concerned about the PR of massacring Jedi.
"Great care has to be taken not to turn them into martyrs, Darth Sidious--if in the end we want the beings of the galaxy to turn their backs to the light side of the Force."
Damask at this point, wants to create an army of force-resistant creatures called the Yinchorri to fight against the Jedi. He meets with Kaminoan cloners and discusses the possibilities. He does not tell the Kaminoans why he wants to use Yinchorri. The Kaminoans explain to him that it would be a difficult procedure, but possible. They also explain that their facilities are too small to host an army. Damask provides funding for the Kaminoan cloning facilities so that they can create an army.
"More important," Lac Nor said, "while we might be able to grow a few clones, our facilities are at present inadequate to produce an army of any size." "We would also need to consult with military specialist regarding programming," Ko Sai added.
"That can all be arranged," Damask said. "Would you have any objections to working with Rothana Heavy Engineering?"
"Of course not," Ni Timor said.
"Then Damask Holdings can provide whatever funding you need."
Ko Sai's eyes appeared to widen. "The Prime Minister will be very pleased to learn of this".
Damask shares his concerns with Jedi masters Dooku and Sifo-Dyas about a growing threat of star systems becoming disillusioned by the Republic. During their conversation, Damask remembers what Sidious told him before (see the first quote I posted). He then decides that the clone army should be used to fight with the Jedi rather than against them.
Mulling it over anew, Plagueis began to wonder whether he had taken the wrong approach on Kamino. Perhaps, he thought, it would be better to have the Kaminoans create an army capable of fighting alongside the Jedi rather than against them ...
Damask later approaches Sifo-Dyas and says that an army must be created for the Republic.
"Master Jedi, I want to share with you a suspicion I've been carrying like a burden." Damask paused. "I have reason to suspect that the Trade Federation has secretly been procuring more weapons than anyone realizes."
"To go further, I predict that a civil war is brewing."
"The Jedi will be too few to turn the tide. A military needs to be created now, while there's still a chance."
I skipped the quotes for the sake of brevity, but Sifo-Dyas is reluctant at this point and encourages Damask to talk to Supreme Chancellor Valorum. Damask explains the need for secrecy by saying he can't go public with his beliefs because he would be going against some of his own clients. Sifo-Dyas is convinced that Damask's concerns are genuine and admits his own concerns.
"You have read my thoughts, Magister. I have also sensed that war is imminent. I've confessed as much to Master Yoda and others, but to no avail. They give all appearances of being unconcerned. Or preoccupied. I'm no longer sure."
Damask tells Sifo-Dyas about the Kamino cloning facility and their ability to raise an army.
"I believe that the Kaminoans could be induced to grow an train a cloned army."
Sifo-Dyas took a long moment to reply. "You said yourself that the Republic would never sanction an army."
"The Republic needn't know," Damask said cautiously. "Neither would the Jedi Order have to know. It would be an army that might never have to be used, and yet be available in reserve should need ever arise."
"Who in their right mind would fund an army that might never be used?"
"I would," Damask said.
"The Kaminoans will not create an army for me, but they would do so for the Jedi Order. They have been fascinated by the Jedi for millennia."
"The Kaminoans need only a modest down payment, which I could provide to you through untraceable accounts I maintain in Outer Rim banks."
Sifo-Dyas tells Damask that he has to think about it. Damask and Palpatine discuss this later on.
Palpatine thought about it for a moment. "And Sifo-Dyas? Will he do it?"
"Even if he decides against it, there may be a way to place the order in his name. But the Force tells me that he will do it."
@Richards answer explains some of the events that occurred with Dooku and Sifo-Dyas after this.
This is dealt with in the EU novel "Labyrinth of Evil". Master Sifo-Dyas commissioned the Clone Army, presumably with a small down-payment and a blank cheque from the Jedi's own accounts.
Count Dooku (with the assistance of Senator, then Chancellor Palpatine) kitted the army out with fancy hardware and big ships using his own vast personal wealth and any other cash he could lay his hands on:
“Questioned, the Kaminoans were. Furnished much they did.”
“Did they?” Obi-Wan said in surprise. “When?”
“Reticent they were when first to Kamino I went. Only what already they had told you, I heard. That Sifo-Dyas the order placed; that Tyranus the donor clone furnished. That for the Republic the clones were. Seen by the Kaminoans, neither Sifo-Dyas nor Tyranus was. But later, after attacked Kamino was, more I learned from Taun We and Ko Sai. About the payments.”
Although the book isn't G-canon, it's noteworthy that the final 3 episodes of season 3 of Clone Wars were based on this novel.
As to how Dooku/Palpatine/The Republic/The Jedi were able to afford to create a enormous clone army, it would seem to boil down to a range of payments being sourced from a variety of places:
Dooku's vast personal fortune
Funds skimmed from the Republic's budget by Palpatine
Money taken from the Jedi budget by Sifo-Dias.
Money appropriated from the Trade Federation by Dooku