Pokémon can escape from battle, but only after a set amount of failed catch attempts. At current, there is no information on how this amount is determined, nor if it is based off the CP strength or rarity of the Pokémon.
That said, it would most definitely be influenced by the catching difficulty. You can also increase the chances of catching a Pokémon in several ways:
- Using a berry from your backpack
- Using a more powerful pokéball
- Ensuring the circle that appears over the pokémon when you hold down on the pokéball is at its smallest size, when you throw it.
For more information on the "catching circle", in regards to catching difficulty and chance, see our question on "What does the size of the multi-coloured circle mean?".