Let $p(l,k,n)$ denote the number of partitions of $n$ into at most $k$ parts each $\leq l$. Observe that
\begin{align*}
p(l,k,n)&=0\qquad\qquad\text{if } n>kl\\
p(l,k,kl)&=1
\end{align*}
Therefore the generating function
\begin{align*}
P^{(\leq l, \{1,\ldots,k\})}(z)=\sum_{n\geq 0}p(l,k,n)z^n\tag{1}
\end{align*}
is a polynomial in $z$ of degree $kl$.
Introducing the short-hand notation $(z)_p=(1-z)(1-z^2)\cdots (1-z^p)$, we want to show for $k,l\geq 0$
\begin{align*}
P^{(\leq l, \{1,\ldots,k\})}(z)=\frac{(z)_{l+k}}{(z)_l(z)_k}\tag{2}
\end{align*}
Recurrence relation for $p(l,k,n)$:
We observe $$p(l,k,n)-p(l,k-1,n)$$
enumerates the number of partitions of $n$ into exactly $k$ parts, each $\leq l$. We transform each of these partitions by deleting every $1$ that is a part, and subtracting $1$ from each part larger than $1$. The resulting partitions of $n-k$ have at most $k$ parts and each part is $\leq l-1$.
Since this transformation is reversible, it establishes a bjiection between the partitions enumerated by $p(l,k,n)-p(l,k-1,n)$ and those enumerated by $p(l-1,k,n-k)$. Therefore
\begin{align*}
p(l,k,n)-p(l,k-1,n)=p(l-1,k,n-k)\tag{3}
\end{align*}
Thus (3) corresponds with respect to the generating function in (1) to
\begin{align*}
P^{(\leq l, \{1,\ldots,k\})}(z)-P^{(\leq l, \{1,\ldots,k-1\})}(z)=z^kP^{(\leq l-1, \{1,\ldots,k\})}(z)\tag{4}
\end{align*}
We have the boundary conditions
\begin{align*}
p(l,0,n)=p(0,k,n)=
\begin{cases}
1&\qquad \text{ if } k=l=n=0\\
0&\qquad \text{ otherwise}
\end{cases}
\end{align*}
since the empty partition of $0$ is the only partition in which no part is positive and is also the only partition in which the number of parts is nonpositive.
This corresponds with respect to (1) to
\begin{align*}
P^{(\leq l, \{0\})}(z)=P^{(0, \{1,\ldots,k\})}(z)=1
\end{align*}
We want to show that the right hand side of (2) fulfils the same recurrence relation as (4). We introduce the short-hand notation $Q^{(l,k)}(z)$ and define
\begin{align*}
Q^{(l,k)}(z):=\frac{(z)_{l+k}}{(z)_l(z)_k}
\end{align*}
Recurrence relation for $Q^{(l,k)}(z)$:
We obtain
\begin{align*}
Q^{(l,k)}(z)-Q^{(l,k-1)}(z)&=\frac{(z)_{l+k}}{(z)_l(z)_k}-\frac{(z)_{l+k-1}}{(z)_l(z)_{k-1}}\\
&=\frac{(z)_{l+k-1}}{(z)_l(z)_k}\left[\left(1-z^{l+k}\right)-\left(1-z^k\right)\right]\\
&=\frac{(z)_{l+k-1}}{(z)_l(z)_k}z^k\left(1-z^l\right)\\
&=z^k\frac{(z)_{l+k-1}}{(z)_{l-1}(z)_k}\\
&=z^kQ^{(l-1,k)}(z)
\end{align*}
We also have
\begin{align*}
Q^{(l,0)}(z)=Q^{(0,k)}(z)=1
\end{align*}
Conclusion: Since $Q^{(l,k)}(z)$ and $P^{(\leq l, \{1,\ldots,k\})}(z)$ satisfy the same initial conditions and the same defining recurrence they are identical and the claim follows.
Note: This answer is more or less verbatim Theorem 3.1 of The Theory of Partitions by G.E. Andrews.
Let's define some $q$-series notation: $(a;q)_n = \prod_{i=0}^{n-1} (1 - aq^i)$ with shorthand notation $(q)_n = (q;q)_n$. E.g. the left-hand side of Euler's pentagonal theorem as stated in the question is $(x)_\infty$.
Now, $$P(n,k,m) = [x^n z^k] \prod_{i=1}^m \frac{1}{1 - x^i z} = [x^n z^k] \frac{\prod_{i=m}^\infty (1 - x^{i+1} z)}{\prod_{i=0}^\infty (1 - x^{i+1} z)} = [x^n z^k]
\frac{(x^{m+1}z;x)_\infty}{(xz;x)_\infty}$$
There are a couple of theorems due to Euler: $$(-x;q)_\infty = \sum_{k=0}^\infty q^{k(k-1)/2}(q)_k^{-1} x^k \\
(-x;q)_\infty^{-1} = \sum_{k=0}^\infty (-1)^k (q)_k^{-1} x^k$$
Then $$(x^{m+1}z;x)_\infty(xz;x)_\infty^{-1} = \left(\sum_{k=0}^\infty x^{k(k-1)/2}(x)_k^{-1} (-x^{m+1}z)^k\right) \left(\sum_{k=0}^\infty (-1)^k (x)_k^{-1} (-xz)^k\right) \\
= \left(\sum_{j=0}^\infty (-1)^j x^{j(j+2m+1)/2}(x)_j^{-1} z^j\right) \left(\sum_{k=0}^\infty (x)_k^{-1} x^k z^k\right) \\
= \sum_{j=0}^\infty \sum_{k=0}^\infty \frac{(-1)^j x^{j(j+2m+1)/2+k} z^{j+k}}{(x)_j (x)_k}$$
In particular, $$P(n,k,m) = [x^n] \sum_{j=0}^\infty \frac{(-1)^j x^{j(j+2m-1)/2+k}}{(x)_j (x)_{k-j}}$$
Note that if $P'(n,m)$ counts the partitions of $n$ into parts of at most $m$ then $$P'(n,m) = [x^n] \prod_{i=1}^m \frac{1}{1-x^i} = [x^n] (x)_m^{-1}$$ so $$P(n,k,m) = \sum_{a=0}^\infty \sum_{b=0}^\infty \sum_{j=0}^\infty (-1)^j P'(a,j) P'(b,k-j) [n-k-a-b=j(j+2m-1)/2]\\
= \sum_{a=0}^\infty \sum_{b=0}^\infty \sum_{j \in \frac{1-2m\pm\sqrt{4m^2-4m+1+8(n-k-a-b)}}{2}} (-1)^j P'(a,j) P'(b,k-j)$$
It's not quite as elegant as the pentagonal theorem...
Best Answer
We can write the product as
We conclude \begin{align*} \color{blue}{\sum_{n \geq 0} p_{\leq k}(n)x^n = \prod_{i=1}^k \frac{1}{1-x^i}} \end{align*}
Example: We look at an example with small values $n=5$ and $k=4$. Denoting with $[x^n]$ the coefficient of $x^n$ of a series we get \begin{align*} \color{blue}{[x^5]\prod_{i=1}^4 \frac{1}{1-x^i}} &=[x^5]\left(1+x+x^2+\cdots\right)\left(1+x^2+x^4+\cdots\right)\\ &\qquad\qquad\cdot \left(1+x^3+x^{6}+\cdots\right)\left(1+x^4+x^{8}+\cdots\right)\\ &=[x^5]\left(1+x+x^2+x^3+x^4+x^5\right)\left(1+x^2+x^4\right)\left(1+x^3\right)\left(1+x^4\right)\\ &=[x^5]\left(x^5\cdot1\cdot1\cdot1+x^3x^2\cdot1\cdot1+x^2\cdot1\cdot x^3\cdot1\right.\\ &\qquad\qquad\left.+x^1x^4\cdot1\cdot1 +1\cdot1\cdot x^2x^3\cdot1+x^1\cdot 1\cdot 1\cdot x^4\right)\\ &\,\,\color{blue}{=6} \end{align*} corresponding to the $6$ representations of $5$ with parts $1\leq k\leq 4$: \begin{align*} \color{blue}{5}&\color{blue}{=1+1+1+1+1}\\ &\color{blue}{=1+1+1+2}\\ &\color{blue}{=1+1+3}\\ &\color{blue}{=1+2+2}\\ &\color{blue}{=1+1+3}\\ &\color{blue}{=1+4} \end{align*}