I claim this holds with $C=32$, which can probably be improved. Translating $f$ and adding an affine function to it does not affect the condition or conclusion. So we may normalize things so that $f(0)=0$ and $\nabla f(0)=0$, and our goal is to prove $|\nabla f(x)|\le 32|x|$.
With $\lambda=1/2$, the stated condition becomes
$$\left|\frac{f(x) + f(y)}{2} - f\left(\frac{x+y}{2}\right)\right| \le |x-y|^2,\quad x,y \in\mathbb R^d\tag{1}$$
For the function $g(x)=4|x|^2$ we have
$$\frac{g(x) + g(y)}{2} - g\left(\frac{x+y}{2}\right) = 2|x|^2+2|y|^2 -|x+y|^2 = |x-y|^2\tag{2}$$
Hence, both functions $h_+=g+f$ and $h_-=g-f$ are midpoint-convex:
$$\frac{h_{\pm}(x) + h_{\pm}(y)}{2} - h_{\pm}\left(\frac{x+y}{2}\right)\ge 0\tag{3}$$
Since Midpoint-Convex and Continuous Implies Convex, both $h_+$ and $h_-$ are convex. In the following, $h$ stands for either $h_+$ or $h^-$.
By construction, $\nabla h_{\pm}(0)=0$, which in view of their convexity implies $h_{\pm}(x)\ge 0$ for all $x$. Hence $|f(x)|\le 4|x|^2$. This in turn implies $$h_{\pm}(x)\le 8|x|^2\tag{4}$$
In the following, $h$ stands for either $h_+$ or $h_-$.
Fix $x_0$ and let $v = \nabla h(x_0)$. Let $x_1 = x_0+\frac{|x_0|}{|v|}v$. By convexity,
$$
h(x_1) \ge h(x_0)+\nabla h(x_0)\cdot (x_1-x_0) \ge |v| |x_0| \tag{5}
$$
On the other hand, (4) implies
$$
h(x_1) \le 8|x_1|^2 \le 8|2x_0|^2 = 32|x_0|^2 \tag{6}
$$
Combine (5) and (6) to get $|v|\le 32|x_0|$. We thus have proved
$$
|\nabla h_{\pm}(x)|\le 32|x|,\quad \forall x\in\mathbb R^d \tag{7}
$$
Since $f=(h_+ - h_-)/2$, it follows that $|\nabla f(x)|\le 32|x|$, as claimed.
Remark
We don't need $f$ to be differentiable everywhere: the inequality $|\nabla f(x)-\nabla f(y)|\le 32|x-y|$ holds provided $f$ is differentiable at the points $x$ and $y$.