I fill some detail in @geetha290krm's excellent answer to better understand his/her ideas.
We have
$$
\varphi \left (\int_A f \mathrm d \mu\right ) = \varphi \left (\int_A g \mathrm d \mu \right) \quad \forall A \in \mathcal F, \forall \varphi \in E^*.
$$
Lemma: Let $(F, |\cdot|_F)$ be a Banach space and $L:E \to F$ continuous linear. Then $L \circ f \in L_1(X, \mu, F)$ and
$$
L \left ( \int_X f \mathrm d \mu \right ) = \int_E L \circ f \mathrm d \mu.
$$
This lemma is Theorem 2.11. of Amann's Analysis III. By our Lemma, we get
$$
\int_A \varphi \circ f \mathrm d \mu = \int_A \varphi \circ g \mathrm d \mu \quad \forall A \in \mathcal F, \forall \varphi \in E^*.
$$
Notice that $\varphi \circ f, \varphi \circ g$ are real-valued, so for all $\varphi \in E^*$
$$
\varphi \circ f = \varphi \circ g \quad \quad \text{amost everywhere}.
$$
By Pettis's theorem, $f, g$ are $\mu$-essentially separably valued. By restricting to a separable subspace of $E$, we can assume that $E$ is separable. This implies the closed unit ball $B_{E^*}$ of $E^*$ is compact and metrizable in the weak$^*$ topology $\sigma(E^*, E)$. This comes from Theorem 3.28. of Brezis's Functional Analysis. Compact metric space is separable, so $B_{E^*}$ has a countable dense (w.r.t. $\sigma(E^*, E)$) subset $(\varphi_n)$.
For each $\varphi_n$, there is a $\mu$-null set $N_n \in \mathcal F$ such that
$$
\varphi_n \circ (f-g) (x) = 0 \quad \forall x \in N_n^c := X \setminus N_n.
$$
Let $N := \bigcup_n N_n$. Then $N$ is a $\mu$-null set. Then
$$
\varphi_n \circ (f - g) (x) = 0 \quad \forall n, \forall x \in N^c := X \setminus N
$$
Fix $\varphi \in E^*$. There is a subsequence $\lambda$ such that $\varphi_{\lambda(n)} \xrightarrow{n \to \infty} \varphi$ in $\sigma(E^*, E)$, which is equivalent to
$$
\varphi_{\lambda(n)} (e) \xrightarrow{n \to \infty} \varphi (e) \quad \forall e \in E.
$$
In particular,
$$
\varphi_{\lambda(n)} \circ (f - g) (x) \xrightarrow{n \to \infty} \varphi \circ (f - g) (x) \quad \forall x \in N^c.
$$
It follows that
$$
\varphi \circ (f - g) (x) =0 \quad \forall \varphi \in E^*, \forall x \in N^c.
$$
As such,
$$
(f - g) (x) =0 \quad \forall x \in N^c.
$$
This completes the proof.