A Pokémon with an original Trainer different from its current Trainer is referred to as an outsider Pokémon, and will only obey a Trainer with the sufficient number of Gym Badges. The friendship of a Pokémon is set to 70 when it is traded from one game to another.
So no a Pokémon does not retain it's Friendship when traded to another game. The Friendship Value of a Pokémon is reset to 70 if it is traded, regardless of the Friendship Value it had before it was traded and the Base Friendship for it's species.
A Pokémon's Base Friendship is the Value to which its Friendship is set when the Pokémon is Caught or received from an Event or NPC. The Base Friendship for most Pokémon is 70 however some Pokémon have a higher Base Friendship for example Chansey and Blissey at 140, and some a lower Base Friendship such as Lugia and Ho-Oh at 0. A Pokémon hatched from an Egg has its Friendship set to 120, while a Pokémon caught in a Friend Ball has its Friendship set to 200.
For a list of Pokémon by their Base Friendship click here.
Sources: Bulbapedia - Trading | Bulbapedia - Friendship