Any prior assumption that makes it true. A simple case where your statement is true is the case of an interval $K\subset\mathbb{R}_+ $, and $(p_k)_{k\ge0}$ are monomials, $p_k(x)=x^{n_k}$, of degrees $0=n_0<n_1<\dots$. For in this case, by the MuntzMüntz-Szász Theorem, the $(p_k)_{k\ge0}$ span a dense subspace in $C^0(I)$, if and only if their derivatives $(p'_k)_{k\ge0}$ do (this of course because $\sum_{k=1}^\infty\frac{1}{n_k}=+\infty$ if and only if $\sum_{k=2}^\infty\frac{1}{n_k-1}=+\infty$). If by the assumption $S$ is uniformly dense in $C^1(I)$, it is also uniformly dense in $C^0(I)$, therefore the span of the $(p'_k)_{k\ge0}$ is also uniformly dense in $C^0(I)$. Hence, for any $f\in C^1(K)$ there is a sequence $g_n\in S$ such that $g_n'$ converges uniformly to $f'$; since $S$ contains the constants, we can assume $g_n$ converges to $g$ at least on a pont of $K$, but then also $g_n$ converges uniformly to $f $ by the theorem of limit under the sign of derivative.