There are several factors at play here. For example, your gif creation app may have a quality slider/setting that influences the size of the output. However, the most likely cause is the difference in compression.
The videos your iPhone records are probably compressed using a highly efficient codec such as H264 (I didn't find any information on what codec/file type the iPhone camera uses, but I'll take an educated guess and say it's mp4). This codec is very efficient at reducing the file size of a video while maintaining relatively high quality.
The gif-format, on the other hand, was built for an entirely different purpose. It was actually intended for small, animated graphics with limited color palettes, not complex videos. The original gif-format is lossless, meaning it stores every frame of the animation completely. Works great for those small animated graphics, but is terrible for actual video. Actually, because of this, many apparent gifs that you see on the internet aren't actually gifs.
In conclusion: Gif is a terrible format to store or transmit video, use a video format instead. Follow the link above if you are interested in the technical side of this.