
A clause is a grammatical unit built around a verb. It usually has a subject and a predicate.
Independent and dependent clauses
The gate opened is an independent clause. The gate is the subject, and opened is the predicate. The clause can stand alone.
In When the gate opened, we went inside, when the gate opened is a dependent clause. It has the same subject and verb. The word when makes it a time clause that tells when we went inside.
How to recognize a clause
Compare before sunrise and before the sun rose. The first is a prepositional phrase. The second has its own subject the sun and verb rose, so it is a clause.
A subject can be understood. In the command Wait by the gate, the subject is understood to be you. Some dependent clauses contain a nonfinite verb, such as the infinitive in We stopped to check the map. The group to check the map gives the purpose, and the people who stopped are understood to do the checking. Some grammar books call this group an infinitive phrase.