transfer function and error gain function
Let me label your circuit nodes for better understanding of your question







simulate this circuit &ndash; Schematic created using CircuitLab

To answer your question I must first clarify some definitions:


Error gain function: a gain k that multiplies the error e = r-y
Transfer function: the behavior of the closed-loop system y/r


Now, 

$$
y=k\cdot e
$$
$$
e=r-y
$$
$$
y=k\cdot (r-y)
$$

So, the error gain function follows as

$$
k=\frac{y}{r-y}
$$

So, you don't even need the transfer function to establish the value of k. You just need y and r. 

Anyway the transfer function is 

$$
TF=\frac{y}{r}=\frac{k}{k+1}
$$

So, if you're given the transfer function (note that this is just a constant for this theoretical system) you can find k as

$$
k=\frac{TF}{1-TF}
$$

Note also that, with negative feedback, in stable system conditions, and with finite k:

$$
0\leq TF&lt;1
$$