Harry and Dumbledore talk about it briefly at the end of *Chamber of Secrets*:

> "So I *should* be in Slytherin," Harry said, looking desperately into Dumbledore's face. "The Sorting Hat could see Slytherin's power in me, and it -"
>
> "Put you in Gryffindor," said Dumbledore calmly. "Listen to me, Harry. **You happen to have many qualities Salazar Slytherin prized in his hand-picked students. His own very rare gift, Parseltongue - resourcefulness - determination - a certain disregard for rules,**" he added, his mustache quivering again. "Yet the Sorting Hat placed you in Gryffindor. You know why that was. Think."
>
> "**It only put me in Gryffindor,**" said Harry in a defeated voice, "**because I asked not to go in Slytherin...**"

(source: *Harry Potter and the Chamber of Secrets*, chapter eighteen, *Dobby's Reward*)

So it seems the Hat was very strongly inclined to place Harry in Slytherin, but Harry's intense desire to avoid that fate swayed it into placing him in Gryffindor instead.