Here's why:
* Subject: The subject is "hundreds of gulls", the thing the sentence is about.
* Predicate: The predicate tells us what the subject is doing or being. It contains the verb and any other information that describes the action or state of being. In this case, the gulls were "flying around the dock".