To ensure that the Gyarados' speed IV is passed down, you need the Power Anklet, bought from the Battle Maison in Kiloude City for 16 BP. Slap the Anklet on your Gyarados and when it's in the day-care producing eggs it will always pass down its speed IV to all offspring. You have to have beaten the Elite 4 first though, because you can't access Kiloude City unless you have the train ticket that Sycamore gives you in the post-game segment.
Note that if you also have the destiny knot (which passes down 5 randomly selected IVs from the parents' pool of 12) then the Gyarados' speed IV would always be one of those 5. The power item stacks with the destiny knot's effect, it doesn't add to it (in other words, you don't get 5 IVs courtesy of the knot and the Gyarados' speed IV courtesy the Anklet)
Also, FWIW, if you can get to Kiloude and buy the power items, you can also get your IVs checked from the guy on the left-hand side of the city's pokecenter. Just watch for whatever IVs he says "can't be beat" and you'll know those are what are maxed on that particular Pokemon.