To find the initial value of \( g \) in the equation \( g = 50x + 1,000 \), we substitute \( x = 0 \) (which represents the time of sunrise).
\[ g = 50(0) + 1,000 \] \[ g = 0 + 1,000 \] \[ g = 1,000 \]
Thus, the initial value of \( g \) when \( x = 0 \) (at sunrise) is 1,000 gallons.