Let's begin with two phrases 'language acquisition' and 'language learning'. Do you know the difference between these two phrases? If you don't - language acquisition is something when a person learns a language without putting in special effort, for example, our native language. Most of us 'acquire' it, rather than formally learning it. Language learning occurs when you go to school and start formally learning your native language and, quite often a second or a foreign language.
The question, if language classes are necessary for learning a language is more prevalent now than ever before - with the emergence of apps like Duolingo and Youtube. I am a multilingual person and have acquired several languages without attending classes, or attending very few classes on a beginner level and then working on the language on my own. This question is a hard question, and has no concrete answer. Yes, there are many people who have learnt a language without attending any class, but they might make errors in grammar and pronunciations later as they had no formal training. There are people who have never attended a single class of a language, and yet speak flawlessly - they are no doubt gifted! The answer to the question in the title may also depend on what does one understand by 'learning' a language? Is it the ability to speak, to understand or is it the flawless competence in reading, writing, listening (understanding) and speaking?
As a linguist, I would say that acquiring speech and understanding of a language is possible without having formal language classes but have a full competence in reading, writing, understanding and speaking is rather rare.