Let $f$ be convex and $A$ a Borel subset of $\mathbb R^d$ on which $f$ is differentiable. Is the gradient $\nabla f: A \to \mathbb R^d$ measurable? Let $X := \mathbb R^d$, $\lambda^d$ be the $d$-dimensional Lebesgue measure on $X$, and $f:X \to \mathbb R$ convex. Then there is a Borel set $N \subset X$ such that $\lambda^d (N) = 0$ and $f$ is differentiable on $A := X \setminus N$. Clearly, $A$ is Borel measurable. It follows that the gradient $\nabla f: A \to X$ of $f$ is well-defined.

*

*If $f$ is differentiable on $X$, then $A = X$ and $f \in \mathcal C_1 (X)$.


*Clearly, the Borel $\sigma$-algebra $\mathcal B(A)$ is a subset of the Borel $\sigma$-algebra $\mathcal B(X)$, i.e., $\mathcal B(A) \subset \mathcal B(X)$.
My question: Is the map $\nabla f$ measurable?
 A: Yes, since a convex function $f:\mathbb{R}^d\rightarrow\mathbb{R}$ is locally Lipschitz (see e.g. Theorem 6.3.1, pp. 236-239 of the book by L. C. Evans and R. F. Gariepy, Measure Theory and Fine Properties of Functions, CRC Press, 1992).
Recall that, as you wrote it yourself in the particular case of convex functions and more generally by Rademacher's theorem, if $g:\mathbb{R}^d\rightarrow\mathbb{R}$ is locally Lipschitz then $g$ is differentiable $\lambda^d$-almost everywhere. Moreover, in that case the distributional partial derivatives of $g$ are in $L^\infty_{loc}(\mathbb{R}^d,\lambda^d)$ and can be identified $\lambda^d$-almost everywhere (say, on a Borel subset $A\subset\mathbb{R}^d$ with $\lambda^d(\mathbb{R}^d\smallsetminus A)=0$ as you defined it) with the classical partial derivatives of $g$ (for the details of all statements above for locally Lipschitz functions, see e.g. Theorem 5 in subsection 4.2.3, pp. 131-132 and Theorems 6.2.1, 6.2.2, pp. 235 of Evans-Gariepy), hence these partial derivatives are in $L^\infty_{loc}(A,\lambda^d)$ and therefore are (Borel) measurable.
