When I bought my machine, it wasn’t working and was sold as “unknown, non-working condition”. This model of espresso machine is super popular, and you can find a lot of info about how it works and how to repair every single piece of it. So, I won’t write everything again over here, but will make it easier for you and link all the resources I used. My main source of knowledge was a blog dedicated to modding and fixing the Gaggia Classic (mainly), which is absolutely great, detailed, and insightful, but available only in Polish. If you don’t speak this language, I suggest trying auto-translation, as the blog is totally worth it.
Using this set of links, you can basically repair anything you want in your Gaggia as well 🙂