As far as I know, companies like Gfycat make money by selling API access to different apps. Like say in a messaging app likeTelegram or Signal. The easiest way for them to integrate a gif search and send function inside of messages is through API access to Gfycat's servers. Gfycat then charges them for this streamlined integration and access.
That plus selling user data or ads on their website means they will have some revenue. I dont know if its enough to keep them afloat. Since they are shutting down, I'm guessing it didnt pan out so well.