Just to answer the most direct version of your question, the valuation is just based on how much of an equity stake was purchased, and for how much money. So they raised $72MM in exchange for a presumed 12% equity stake in the company, meaning that they company was implicitly valued at $600MM.
As to how the $72MM (and the 12%) is calculated, that's a negotiation between parties, and there is no universally accepted "formula" for calculating this. Private equity and VC companies take risks based on their evaluation of the company prospects. If there were a magic formula, then investing in companies (and finding funding) would not be at all interesting or competitive.
Aside from any any numbers about user adoption, growth rate, or potential advertising angles, the other significant thing that an investor may be looking for is the chances of a downstream acquisition by a player looking to expand its reach. Giphy would be a natural target for large search companies, or social media companies (who might be interested in a closer relationship with an effective content source), or various chat companies (like Slack or Facebook or even Apple).
Whether an acquiring company will be willing to pay enough money for a company like this to be worth the investment, rather than building similar functionality in-house, is part of the judgment of the investors, which they can base on qualitative evaluations of the technical or sales abilities of the employees or the difficulty of the problem space.