*Remark: I am not sure if this is non-trivial enough to be on MO, feel free to downvote/vote to delete/transfer to MSE if you think this is trivial. I tried to write an obnoxiously detailed answer, primarily for my own understanding. Please point out if the argument is non-optimal in some places.*

Throughout the answer, $k$ is a fixed infinite field. Since closed immersions are of finite type and $X_{red}\rightarrow X$ induces a bijection on the sets of all points/closed points, we can replace $X$ by $X_{red}$.

First, note the following.

Let $k$ be an infinite field. Let $d$ be a positive integer. Then the cardinality of the set of maximal ideals of $k[x_1, \dots, x_d]$ is equal to the cardinality of the set of prime ideals of $k[x_1, \dots, x_d]$ and is equal to the cardinality of $k$.

For an integral affine scheme of finite type over $k$ and of relative dimension $d>0$, the set of closed points and the set of all points have cardinality equal to that of $k$. To see this, note that by Noether normalization there is a finite surjective morphism $X\rightarrow \mathbb{A}_k^d$.

By definition, the image of a closed point under a finite morphism between arbitrary schemes is a closed point. I also claim that the preimage of a closed point under a finite morphism between schemes of finite type over $k$ consists of closed points. This is because Nullstellensatz says that a point on such a scheme is closed iff the residue field is a finite extension of $k$, and for finite $f$ the field extension $k(f(x))\subset k(x)$ is finite. The second claim is probably true without any assumptions on the schemes but I don't know how to prove it.

Therefore, the cardinality of the set of closed points of $X$ is at least the cardinality of the set of closed points of $\mathbb{A}^k_d$ and at most $\aleph_0$ times the cardinality of the set of closed points of $\mathbb{A}^k_d$ (since finite morphisms are quasi-finite). The same is true verbatim for the set of all points so we are done by the boxed statement.

By the hypothesis on relative dimension, we can an irreducible component $Y\subset X$ such that $f|_Y$ is not of relative dimension $\leq 0$. Closed immersions are of finite type, so $Y$ (with its reduced induced scheme structure) is an integral scheme of finite type over $k$. Since $\mathrm{Spec}\:k$ has only one point, it follows that $f|_Y$ has a well-defined relative dimension $d>0$. The closed immersion $Y\rightarrow X$ gives us an injection from the set of points of $Y$ into the set of points of $X$, and an injection from the set of closed points of $Y$ into the set of the closed points of $X$.

Now consider any non-empty affine open $U\subset Y$ (whose structure morphism is automatically of relative dimension $d$). For schemes of finite type over a field, a point is closed iff it is closed in some affine open. Thus the open immersion gives us an injection from the set of points of $U$ into the set of points of $Y$, and an injection from the set of closed points of $U$ into the set of the closed points of $Y$. So the cardinality of the set of closed points/all points of $X$ is at least the cardinality of $k$.

Now, let's go in the converse direction. Since $X$ is of finite type over a Noetherian scheme ($\mathrm{Spec}\:k$), it is Noetherian. In particular, it has finitely many irreducible components $C_i$ (which, being closed subschemes of a Noetherian scheme, are Noetherian). Cover each of $C_i$ by finitely many non-empty affine opens $U_{ij}$. Then each $U_{ij}$ is an integral scheme of finite type over a field (integral because it is a non-empty open subscheme of an integral scheme, of finite type because open immersions into a Noetherian scheme are of finite type and closed immersions are of finite type).

We have a surjective morphism $\sqcup U_{ij}\rightarrow X$ which sends closed points to closed points (combine the fact that a point is closed in a closed subset iff it is closed in the entire space and the second link above) and under which the preimage of a closed point consists of closed points. Thus the cardinality of the set of closed points of $X$ is at most $\aleph_0$ times the cardinality of $k$ and the same applies to the set of all points.