There are also parallel accounts in Matthew and Mark:
And when they were come to the multitude, there came to him a certain man, kneeling down to him, and saying, Lord, have mercy on my son: for he is lunatick, and sore vexed: for ofttimes he falleth into the fire, and oft into the water. And I brought him to thy disciples, and they could not cure him. Then Jesus answered and said, O faithless and perverse generation, how long shall I be with you? how long shall I suffer you? bring him hither to me. And Jesus rebuked the devil; and he departed out of him: and the child was cured from that very hour.
And one of the multitude answered and said, Master, I have brought unto thee my son, which hath a dumb spirit; And wheresoever he taketh him, he teareth him: and he foameth, and gnasheth with his teeth, and pineth away: and I spake to thy disciples that they should cast him out; and they could not. He answereth him, and saith, O faithless generation, how long shall I be with you? how long shall I suffer you? bring him unto me. And they brought him unto him: and when he saw him, straightway the spirit tare him; and he fell on the ground, and wallowed foaming. And he asked his father, How long is it ago since this came unto him? And he said, Of a child. And ofttimes it hath cast him into the fire, and into the waters, to destroy him: but if thou canst do any thing, have compassion on us, and help us. Jesus said unto him, If thou canst believe, all things are possible to him that believeth. And straightway the father of the child cried out, and said with tears, Lord, I believe; help thou mine unbelief. When Jesus saw that the people came running together, he rebuked the foul spirit, saying unto him, Thou dumb and deaf spirit, I charge thee, come out of him, and enter no more into him. And the spirit cried, and rent him sore, and came out of him: and he was as one dead; insomuch that many said, He is dead. But Jesus took him by the hand, and lifted him up; and he arose.
In this account, Jesus was not upbraiding the Apostles for their lack of faith. He was, rather, upbraiding the man who complained about the Apostles, as well as the bystanders, of being faithless and perverse.
Theophylact's explanation of the passage in Luke:
This man was exceedingly faithless. And for this reason the demon did not depart form his child, the unbelief overcoming the power of the apostles. Even now the man brazenly displays his unbelief, approaching the Lord in the presence of all to accuse His disciples. But the Lord shows him that his unbelief caused the child not to be healed, and He in turn rebukes him in the presence of all, and not only him, but all the others with him as well. When He says, O faithless generation, He includes all the Jews.
Cyril of Alexandria (c 376-444) and John Chrysostom (c 349-407) offer similar interpretations in their homilies on Luke and Matthew, respectively.