Nothing of this sort is true for most standard cones (e.g. the natural cone in classical function spaces). Consider the following examples.
Example 1. Let $X = C_{\mathbb{R}}[0,1]$ with its usual cone. Then an extreme ray corresponds with a function $f \in X_+ \setminus \{0\}$ such that $0 \leq g \leq f$ implies $g = \alpha f$. But any non-zero function must be non-zero on some open interval, so for any $f \gneq 0$ there is a plethora of functions lying between $0$ and $f$. Conclusion: there are no extreme rays.
Example 2. Let $Y = \ell_{\mathbb{R}}^\infty$ with its usual cone. The extreme rays are the standard basis vectors $e_i$, so the closed convex cone they generate is only $(c_0)_+$.
Example 3. Similarly, let $Z = B(\ell_{\mathbb{C}}^2)^{\text{sa}}$ (the self-adjoint operators $\ell_{\mathbb{C}}^2 \to \ell_{\mathbb{C}}^2$) with the positive semidefinite cone. The extreme rays are the rank one orthogonal projections. The closed cone they generate is $K(\ell_{\mathbb{C}}^2)_+$, the cone of compact positive semidefinite operators.
Similarly, the statement fails for many spaces of differentiable or Lebesgue integrable functions on some domain $U \subseteq \mathbb{R}^n$. (It is however true for most sequence spaces, for instance $\ell_{\mathbb{R}}^p$ with $1 \leq p < \infty$.)
To get sufficient criteria for the statement to be true, I guess one must resort to Krein–Milman type theorems (e.g. assume that the cone has a weakly compact base). For more on this, see §3.8 and §3.12 in [Jam70]. (Warning before reading Jameson's book: in the ordered vector spaces community, cone means proper/pointed convex cone — see §1.1.) In particular:
Proposition. Let $E$ be a locally convex space, and let $E_+ \subseteq E$ be a convex cone. If $E$ has an interior point, then the (topological) dual cone $E_+' \subseteq E'$ is the weak-$*$ closed convex cone generated by its extreme rays.
Proof. Combine Theorem 3.8.6, Theorem 3.12.8 and Corollary 3.12.9 from [Jam70]. $\hspace{18mm}\Box$
References.
[Jam70]: Graham Jameson, Ordered Linear Spaces, Springer Lecture Notes in Mathematics 141, 1970.
This is not true and here is a counterexample in $\mathbb R^3$ (It is obviously true in $\mathbb R^1$ and I have the impression that it might be true in $\mathbb R^2$).
Let
$$
C_\pm := \{ (x,y,z) \in \mathbb R^3 \mid x = \pm 1 \text{ and } y^2 + (z-1)^2 = 1 \}
$$
and
$$
K := C_+ \cup C_-.
$$
Obviously, $K$ is compact.
Let us check that its convex, conical hull $D$ is not closed. It is clear that the points
$$
x_n := n \,(0, 1/n, 1 - \sqrt{1 - 1/n^2})
$$
belong to $D$ for $n \in \mathbb N$ and $x_n \to (0, 1, 0) =: x$. However, $x$ does not belong to $D$: Indeed, since the third component is zero, it can only be a convex conical combination of points of the form $(\pm 1, 0, 0)$ and this is not possible.
Best Answer
No, this is not true, and a counterexample in $\mathbb R^3$ can be found.
Pick two closed convex cones $K_1,K_2$ whose sum $K_1+K_2$ is not closed, see here.
Now simply define $C:=K_1\cup K_2$. Then the set $C$ is closed, but the convex cone generated by $C$ is $K_1+K_2$, which is not closed.