Functional derivatives can be understood in the sense of Gateaux as follows. Let $\phi\in C^\infty(\mathbb R^n)$ be a smooth function and $S:C^\infty(\mathbb R^n) \rightarrow \mathbb R$ be a functional. For a given $\eta\in C^\infty(\mathbb R^n)$, we define
$$\frac{d}{d\epsilon} S[\phi+\epsilon \cdot \eta] \bigg|_{\epsilon=0}$$
to be the directional derivative of $S$ along $\eta$ at $\phi$. If this can be written in the form
$$\int \mathrm d^nx E\big[x,\phi(x), \partial \phi(x),\ldots\big] \eta(x)$$
for some function $E$, then we write $E\big[\phi(x),\partial \phi(x),\ldots\big]=: \frac{\delta S}{\delta \phi(x)}$ and call it the functional derivative of $S$ with respect to $\phi(x)$ (or somewhat more accurately, the functional derivative of $S$ evaluated at $\phi(x)$).
Example
Having made that preliminary defininition, consider the functional $S$ which eats a smooth function and integrates its square over $\mathbb R^n$. Then
$$\frac{d}{d\epsilon} S[\phi + \epsilon \cdot \eta] \bigg|_{\epsilon=0}= \frac{d}{d\epsilon} \int \mathrm d^n x \big(\phi(x)+\epsilon \cdot \eta(x)\big)^2\bigg|_{\epsilon=0} = \int \mathrm d^n x \ 2\phi(x) \eta(x)$$
$$\implies \frac{\delta S}{\delta \phi(x)} = 2\phi(x)$$
Next, let $T:C^\infty(\mathbb R^n)\rightarrow C^\infty(\mathbb R^n)$ be an operator. Once again we consider a Gauteaux-derivative which will now be function-valued rather than $\mathbb R$-valued:
$$\frac{d}{d\epsilon} T[\phi+ \epsilon \eta;x]\bigg|_{\epsilon=0}$$
where the notation $T[\ldots;x]$ is used to remind us that after plugging in a function $\phi$ to the first slot of $T$, the result is a (possibly generalized) function of the dummy variable $x$. If this can be expressed as
$$\frac{d}{d\epsilon} T[\phi+ \epsilon \eta;x]\bigg|_{\epsilon=0} = \int \mathrm d^n y F[x,y,\phi(y),\ldots] \eta(y)$$
for some $F$, then as before we call $F[\ldots]=: \frac{\delta T[\phi;x]}{\delta \phi(y)}$ the derivative of $T$ with respect to (or evaluated at) $\phi(y)$.
Example
Let $T$ be the operator which eats a function and spits that function right back out, i.e. $T[\phi;x] = \phi(x)$. Then
$$\frac{d}{d\epsilon}T[\phi+\epsilon\cdot \eta;x]\bigg|_{\epsilon=0} = \frac{d}{d\epsilon}\big(\phi(x)+\epsilon\cdot \eta(x)\big)\bigg|_{\epsilon=0} = \eta(x) = \int \mathrm d^4n y \delta(x-y) \eta(y)$$
$$\implies \frac{\delta T[\phi;x]}{\delta \phi(y)} = \delta(x-y)$$
As a mild abuse of notation, this is often written $\frac{\delta \phi(x)}{\delta \phi(y)}= \delta(x-y)$. Note that in elementary calculus we usually write the derivative of the function $\mathrm{sq}:x\mapsto x^2$ as $\frac{d(x^2)}{dx} = 2x$ rather than $\frac{d(\mathrm{sq})}{dx} = 2x$; this is precisely the same abuse of notation as employed here.
Finally, consider some operator $T:C^\infty(\mathbb R^n)\rightarrow \mathbb C^\infty(\mathbb R^n)$ and some function $\phi$ such that in a neighborhood of $\phi$, $T$ can be inverted, i.e. $T^{-1}\big[T[\phi;\cdot];x\big] = \phi(x)$. After a bit of work, one can show that if
$$\frac{d}{d\epsilon} T[\phi+ \epsilon \eta;x]\bigg|_{\epsilon=0} = \int \mathrm d^n y F\big[x,y,\phi(y),\ldots\big] \eta(y)$$
and (letting $\rho(x) = T[\phi;x]$ for brevity)
$$\frac{d}{d\epsilon} T^{-1}\big[\rho+ \epsilon \eta;x\big]\bigg|_{\epsilon=0} = \int \mathrm d^n y G\big[x,y,\rho(y),\ldots\big] \eta(y)$$
then we must have that
$$\int \mathrm d^n z G\big(x,z,T[\phi;z],\ldots\big) F\big(z,y,\phi(y),\ldots\big) = \delta(x-y)$$
or, somewhat less unpleasantly,
$$\int \mathrm d^n z \frac{\delta T^{-1}\big[T[\phi;\cdot],x\big]}{\delta T[\phi;z]} \frac{\partial T[\phi;z]}{\delta \phi(y)} = \delta(x-y)$$
This is essentially the functional(/operator) derivative generalization of the inverse function theorem, and it is in this sense that these derivatives are inverses of one another - not simple multiplicative inverses, but rather integral inverses in the sense above.
It's illuminating to note that if we consider functionals and operators $f:\mathbb R^n\rightarrow \mathbb R^n$ rather than on $C^\infty(\mathbb R^n)$, then the functional derivatives reduce to the corresponding matrices $\frac{\partial f^i}{\partial x^j}$ and the inverse function theorem reduces to a statement about matrix multiplication; in that sense, the derivatives of $f$ and $f^{-1}$ are matrix inverses of one another, not simply multiplicative inverses. Of course, if we continue to simplify and specialize to $n=1$, then we arrive at the inverse function theorem from Calculus 101 in which simple multiplicative inverses finally emerge.
Example
As a trivial example, let $T[\phi;x]=\phi(x)$. Then $T^{-1}[\rho;x] = \rho(x)$ (i.e. $T$ is its own inverse). Both of them have the same derivative as given in the previous example, and indeed
$$\int \mathrm d^n z \delta(x-z) \delta(z-y) = \delta(x-y)$$
Example 2
As a less trivial example, let $T[\phi;x] = f(x)\phi(x)$ as you propose. Then $T^{-1}[\rho;x] = \frac{1}{f(x)}\rho(x)$ (assuming that $f(x)\neq 0$). The derivatives of these operators are simply
$$\frac{\delta T[\phi;x]}{\delta \phi(y)} = f(x)\delta(x-y)\qquad \frac{\delta T^{-1}[\rho;x]}{\delta \rho(y)} = \frac{1}{f(x)} \delta(x-y)$$
and once again,
$$\int \mathrm d^n z \frac{1}{f(x)} \delta(x-z) f(y) \delta(z-y) = \delta(x-y)$$
Example 3
Just for fun, let $T[\phi;x] = \frac{1}{(2\pi)^{n/2}}\int \mathrm d^n k \ e^{-ikx} \phi(k)$ and $T^{-1}[\rho;x] = \frac{1}{(2\pi)^{n/2}}\int \mathrm d^n k\ e^{ikx} \rho(k)$. Then
$$\frac{\delta T[\phi;x]}{\delta \phi(y)} = e^{-ixy}/(2\pi)^{n/2} \qquad \frac{\delta T^{-1}[\rho;x]}{\delta \rho(y)} = e^{ixy}/(2\pi)^{n/2}$$
$$\implies \int \mathrm d^n z \frac{e^{-i(x-y)z}}{(2\pi)^n} = \delta(x-y)$$