Protoplanetary nebulae rotate around a star during planetary formation and consequently all planets formed orbit in the same direction. So it's not possible for a planet to be formed with a retrograde orbit in this way.
However, stars themselves orbit the centre of the galaxy and it is possible that occasionally stars pass in relatively close proximity to one another. In such circumstances (and depending on how close the approach is) it is usually very disruptive for the planets which can be redirected into different orbits possibly eccentric orbits at high inclinations or even ejected from the system entirely.
So the chances for a retrograde planet are not good, but it could happen during a close encounter with another star. Given the right approach of one system to the other and the right positioning and orbit of the planets during the encounter it is possible for a planet to be stolen from one star and pass into the other system.
So for example a star passing "relatively" close to the sun might well steal away Pluto or Neptune and those captured planets could easily be in retrograde orbits. At a smaller scale moons can orbit the "wrong way" as is the case with Neptune's moon Triton which is in retrograde orbit around Neptune.