Let the number of students who played badminton be denoted as \( b \). According to the information given, the ratio of students who played basketball to badminton is 3:2. This can be represented mathematically as:
\[ \frac{\text{students playing basketball}}{\text{students playing badminton}} = \frac{3}{2} \]
From the problem, we know that 15 students played basketball:
\[ \frac{15}{b} = \frac{3}{2} \]
To find \( b \), we can cross-multiply:
\[ 15 \cdot 2 = 3 \cdot b \]
\[ 30 = 3b \]
Now, dividing both sides by 3 gives us:
\[ b = \frac{30}{3} = 10 \]
Thus, the number of students who played badminton is 10.
To find the total number of students in Mr. Lee's gym class, we add the number of students who played basketball with those who played badminton:
\[ \text{Total students} = \text{students playing basketball} + \text{students playing badminton} = 15 + 10 = 25 \]
Therefore, the total number of students in Mr. Lee's gym class last Friday was \( \boxed{25} \).