MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).

This will require very strong conditions on $G$. The most general result I know of is an "almost upward-filtering" condition, fairly well known in stochastic optimal control theory: Assume $G(t,\cdot)$ is measurable for each $t \in [0,1]$, and $\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] < \infty$. Then $\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] = \mathbb{E}[\text{ess}\sup_{t \in [0,1]}G(t,X)]$ if and only if for all $\epsilon > 0$ and $r,s \in [0,1]$ there exists $t \in [0,1]$ such that $\mathbb{E}[(G(t,X) - G(s,X) \vee G(r,X))^-] \le \epsilon$. I believe this result is originally due to J.A. Yan, in the hard-to-find paper "On the commutability of essential infimum and conditional expectation operators". Note that $\sup_{t \in [0,1]}G(t,X)$ need not be measurable, which is why the essential supremum is used in the aforementioned theorem.
A more transparent condition can be derived from the above if we add a continuity assumption: Assume $G(\cdot,x)$ is continuous for each $x$, $G(t,\cdot)$ is measurable for each $t$, and $\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] < \infty$. Then $\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] = \mathbb{E}[\sup_{t \in [0,1]}G(t,X)]$ if and only if there exists $T \in [0,1]$ such that $G(T,X) = \sup_{t \in [0,T]}G(t,X)$ 0,1]}G(t,X)$almost surely. PROOF: The continuity assumption guarantees that$\sup_{t \in [0,1]}G(t,X)$is indeed measurable (e.g. by Theorem 18.19 of Aliprantis & Border), and thus$\text{ess}\sup_{t \in [0,1]}G(t,X) = \sup_{t \in [0,1]}G(t,X)$. The aforementioned theorem and a simple argument using compactness of$[0,1]$and the dominated convergence theorem Fatou's lemma shows that (under our assumptions)$\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] = \mathbb{E}[\sup_{t \in [0,1]}G(t,X)]$if and only if for all$r,s \in [0,1]$there exists$t \in [0,1]$such that$G(t,X) \ge G(r,X) \vee G(s,X)$a.s.. Since the "if" part is trivial, we now prove the "only if". Consider the set $S := \{G(t,X) : t \in [0,1]\}$ with the partial order given by almost sure inequality. Compactness of$[0,1]$and continuity of$G(\cdot,x)$for all$x$yield the existence of an upper bound in$S$for any chain of$S$, and thus by Zorn's lemma$S$contains a maximal element. That is, there exists$T \in [0,1]$such that there is no$s \in [0,1]$for which$G(s,X) \ge G(T,X)$a.s. and$P(G(s,X) > G(T,X)) > 0$. For any$t \in [0,1]$there exists$r \in [0,1]$such that$G(r,X) \ge G(T,X) \vee G(t,X) \ge G(T,X)$a.s., which implies$G(r,X) = G(T,X)$a.s. and thus$G(T,X) \ge G(t,X)$a.s.. Hence$G(T,X) \ge G(t,X)$a.s. for any$t \in [0,1]$. 1 This will require very strong conditions on$G$. The most general result I know of is an "almost upward-filtering" condition, fairly well known in stochastic optimal control theory: Assume$G(t,\cdot)$is measurable for each$t \in [0,1]$, and$\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] < \infty$. Then$\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] = \mathbb{E}[\text{ess}\sup_{t \in [0,1]}G(t,X)]$if and only if for all$\epsilon > 0$and$r,s \in [0,1]$there exists$t \in [0,1]$such that$\mathbb{E}[(G(t,X) - G(s,X) \vee G(r,X))^-] \le \epsilon$. I believe this result is originally due to J.A. Yan, in the hard-to-find paper "On the commutability of essential infimum and conditional expectation operators". Note that$\sup_{t \in [0,1]}G(t,X)$need not be measurable, which is why the essential supremum is used in the aforementioned theorem. A more transparent condition can be derived from the above if we add a continuity assumption: Assume$G(\cdot,x)$is continuous for each$x$,$G(t,\cdot)$is measurable for each$t$, and$\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] < \infty$. Then$\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] = \mathbb{E}[\sup_{t \in [0,1]}G(t,X)]$if and only if there exists$T \in [0,1]$such that$G(T,X) = \sup_{t \in [0,T]}G(t,X)$almost surely. PROOF: The continuity assumption guarantees that$\sup_{t \in [0,1]}G(t,X)$is indeed measurable (e.g. by Theorem 18.19 of Aliprantis & Border), and thus$\text{ess}\sup_{t \in [0,1]}G(t,X) = \sup_{t \in [0,1]}G(t,X)$. The aforementioned theorem and a simple argument using compactness of$[0,1]$and the dominated convergence theorem shows that (under our assumptions)$\sup_{t \in [0,1]}\mathbb{E}[G(t,X)] = \mathbb{E}[\sup_{t \in [0,1]}G(t,X)]$if and only if for all$r,s \in [0,1]$there exists$t \in [0,1]$such that$G(t,X) \ge G(r,X) \vee G(s,X)$a.s.. Since the "if" part is trivial, we now prove the "only if". Consider the set $S := \{G(t,X) : t \in [0,1]\}$ with the partial order given by almost sure inequality. Compactness of$[0,1]$and continuity of$G(\cdot,x)$for all$x$yield the existence of an upper bound in$S$for any chain of$S$, and thus by Zorn's lemma$S$contains a maximal element. That is, there exists$T \in [0,1]$such that there is no$s \in [0,1]$for which$G(s,X) \ge G(T,X)$a.s. and$P(G(s,X) > G(T,X)) > 0$. For any$t \in [0,1]$there exists$r \in [0,1]$such that$G(r,X) \ge G(T,X) \vee G(t,X) \ge G(T,X)$a.s., which implies$G(r,X) = G(T,X)$a.s. and thus$G(T,X) \ge G(t,X)$a.s.. Hence$G(T,X) \ge G(t,X)$a.s. for any$t \in [0,1]\$.