Definition -
(1) The form a verb takes when it is used to show hope, doubt, and wishes, e.g. God save the Queen.
(2) A construction that is used to express counterfactuals, facts or events that are known to be false, but which are entertained as hypotheticals, e.g. If dogs could fly, they would ….

Etymology -
The term derives from the Late Latin subjunctivus, serving to join (from sub, under + jungere, to join).
Note: The Latin term modus subjunctivus was probably a loan translation of the Greek hypotaktike enklisis, subordinated, which was so called because the Greek subjunctive mood was regarded as especially appropriate to subordinate clauses.

Oxford English Dictionary -
Its first citation is from 1530:
"The subjunctive mode whiche they ever use folowyng an other verbe, and addyng this worde que before hym."
(Jehan Palsgrave, Lesclarcissement de la langue françoyse, 84 )

Please comment