Learn to convert gifs and videos to spritesheets, access the indvidual parts of that spritesheet the same way you would with an atlas texture, and then re-create the animation through material bp so you can use them directly in your game with flipbook animation.
https://dev.epicgames.com/community/learning/tutorials/mzy7/unreal-engine-how-to-use-texture-atlases-and-spritesheets-in-material-blueprints