It's from the Monogatari series, which are awesome, but you have to learn to figure out Japanese puns for a few of the jokes to make sense.
There's Bakemonogatari, Nisemonogatari and Nekomonogatari. This particular .gif file is from Nisemonogatari, which is season 2. A third season of the monogatari series will be released sometime this summer. (Nekomonogatari was kinda like an OVA.)