Copyright: toothless dancing
The Toothless Dancing meme is a reference to The Ultimate "How to Train Your Dragon" Recap Cartoon by Cas van de Pol. In the cartoon during Hiccup's 2nd meeting with Toothless, Hiccup feeds Toothless a Codfish and snaps his fingers. Toothless eyes widen and within the next frame, Toothless is standing upright on his hind legs, missing his wings, and dancing. The Driftveil City Theme from Pokémon Black/White plays in the background. Later Hiccup uses his finger snap to make Barf & Belch dance Gangnam Style and Hookfang dance The Griddy. At the short's climax Hiccup stops The Red Death by making her and all the vikings do Toothless' Dance from earlier in the cartoon.
The Dance that Toothless does is actually a reference to a much older meme: The Dancing Lizard Series where an auto-rig of a 3D animated lizard would be dancing to various songs including Driftveil City. Furthermore, it is possible that the concept is at least partially inspired by The Mad Magazine inspired Animated Series on Cartoon Network which featured an episode titled "So You Think You Can Train You Dragon to Dance" specifically parodying How To Train Your Dragon.