Today, recognizing the musical structure of a "classical" composition often requires multiple listens and close examination of the score. Did people who lived during the Classic era, for example, have to do any of that to recognize a sonata-allegro? Or were they just so familiar with pieces in that form that they could recognize it by ear on the first listen?
As you suggested in your title, a listener's familiarity with a musical style can often lead to his or her recognizing—or even anticipating—musical elements such as form or harmony. You mention verse-chorus form in pop music, and another good example from a genre likely familiar to us today is the bass drop in many electronic genres; you hear the very typical build with repeating units being condensed sequentially into shorter and shorter bits (effectively sounding like an increasingly faster rhythm), until this "breaks" (or stops) and the bass-heavy beat drops in.
As far as earlier time periods, in the fourteenth century the isorhythmic motet was very popular. However, it wasn't exactly the "lay-man's" genre, as it often quoted a portion of chant for the tenor and used two different texts in the two upper parts. Johannes de Grocheio (ca. 1255–ca. 1320) stated that motets "should not be performed in the presence of the uneducated (coram vulgalibus)" since they "do not notice its subtlety," and Jacobus (author of the Speculum musicae) specified that "a great gathering of discerning people" is the ideal setting for their performance (both quoted in Zayaruznaya 2015, 7). In addition, scholars have discussed the ways in which composers may have incorporated auditory "clues" to aid in articulating the complex isorhythmic structure (see, for example, Alice Clark, "Listening to Machaut's Motets," Journal of Musicology 21/4: 487-513 [2004]).
As far as the Classic era and sonata form, I know that this was also the case then too. Listeners were certainly familiar with and could hear the form. This is precisely why many scholars talk about Haydn's wit—he would play with the listeners' expectations in terms of form, rhythm, and harmony. I can't provide any specific references for this, as it's not really my specialty, but perhaps u/vornska or u/nmitchell076 could add to this—they are much more knowledgable in this particular time period than I am.
(Thanks to /u/RyanT87 for calling this thread to my attention).
It's a bit of a mixture of both. They might not necessarily have had access to a specific set of terminology to name what they heard, but they would have had a sense of what we now call "sonata allegro form" that they would have thought of as "how an opening movement of a sonata or symphony tends to go."
Sonatas, Symphonies, and Quartets are genres, and they therefore work with your expectations like any other sort of genre does. We certainly have this sort of unstated knowledge of "how something goes" when we watch, say, a romantic comedy. We can identify certain generically "obligatory" things that happen in pretty much every film in that genre (to cite just one thing, the "misunderstanding" that leads to the "breakup" of the main couple about 3/4ths of the way through, which then sets up the final reconciliation at the end when one party, usually the male, "comes to his senses"), and we can feel when a film plays with or rejects that norm to surprise us (Amy Schumer's Trainwreck, for instance, plays out that script but reverses the gender roles).
We don't necessarily need to have a term for something to experience it as a norm. In fact, we need terms precisely when we are distant enough from a practice that we can't cue into the norms "naturally" anymore. Terms are a way of directing our focus to something we might miss otherwise.
I'm on the run right now, but if you have more questions or concerns, I'll be happy to respond more!
(EDIT: More below)