Rip mp4 from youtube
open in photoshop with timeline viewer
save as gif
profit!
if you don't have photoshop, go look for a video to gif website, but I hope the clip is small because nobody is going to allow you to convert a >10 mb file on their service