During the nine and a half days ending with Yom Kipur, we wish each other "גמר חתימה טובה" (an end to the good signing). This seems very strange. Shouldn't it be "גמר חתימה טוב" (a good end to the signing)?
I'm not sure, but I think that it's actually being pronounced "גמר חתימה-טובה". (The last two words are connected.)
And it is correct (grammatically) to say "חתימה טובה"....
To my opinion, the meaning is "I wish to you that the good-signing will end well for you".
I may be wrong, but that's what I have in mind when I'm telling people "גמר חתימה-טובה".
The question is entirely apt, because it gets to the heart of the nature of the possessive form in Hebrew, called "construct state" in English and "סמיכות" in Hebrew.
The question recognizes that the first term in a possessive relationship between two nouns, (called a "construct chain," which can include any number of nouns from two, on up) is the term that controls the gender and number of the chain. Meanwhile, the second term determines whether the chain is definite (with the definite article) or absolute (without).
Hence: בית הכנסת הגדול
"Beit" is in the construct form, signaling a possessive relationship, and governing the qualifier "ha-gadol" in gender (m) and number (sing.).
The "ha" in "ha-knesset" determines the definite status of the chain (i.e., characterized by the definite article "ha") and, therefore, of its qualifier "ha-gadol."
In all of this, over the years, confusion has crept in. The Ashkenazic synagogue in Venice, Italy, for example, is called the בית הכנסת הגדולה. They did not mean the "House of the Great Assembly." They meant, rather, the "Great Synagogue," so they should have used the masc. qualifier "ha-gadol."
Still, this mistake lies at the heart of the question and one of the answers. Does גמר חתימה טובה intend to wish "a good end to the sealing [in the Book of Life]" or "an completion for the good sealing"?
There is a clue to this problem, found in our common abbreviation of this greeting: גמר טוב, which implies that the "completion" is the thing at stake. However, we also abbreviate with the phrase "חתימה טובה," implying that the "seal" is the thing.
After some research, it seems to me that, strictly speaking, it should be גמר חתימה טוב, because this is how the construct chain works canonically, notwithstanding the reasonable logic, proposed above, that we might introduce (if only in our minds) a maqqef (dash that unites two words) into חתימה-טובה and therefore construe it as a single idea/unit. Standard grammar doesn't really go there, though perhaps there are biblical examples of it (I didn't research that far).
If one wants to wish "a completion to a good sealing" then one would, strictly speaking, have to re-word the phrase to something like גמר של חתימה טובה, which would obviate the grammatical problem, though simultaneously introduce a stylistic one.
חתימה is a feminine word. Thus, טובה.