I would give the magikarp a Exp. Share and then have a stronger pokemon battle for awhile until the magikarp gets to level 20 or it learns moves of its own so it can battle. By level 20 it will be a Gyarados.
I caught my Magikarp at a Level 20 at Ollivine City. After failing at evolving at through battles, I just used a Rare Candy on it...and it evolved.
Catch a magikarp at a level below 20 or the evolution will not happen
Level it up to level 20
It will evolve over level 20 I have a magikarp that is level 65 and it envolved at the next level but it did nott learn any good moves
Mine is level 70
Catch a Gyarados!