To add a video in your product gallery at first you need to open the image into the media library.
once you open it you can see a new filed for adding video URL. ( screenshot > https://prnt.sc/r3e5mj ) Just paste your video link (YouTube, Vimeo or self-host) and the video will set with that image.