I am unable to ascertain what would be the subject in the following sentence.
The gift Karen gave to her brother is a teddy bear.
Here the relative pronoun (that) has been omitted after the word gift. If I keep this in mind, then I can rewrite the sentence as
Karen gave the gift to her brother. That gift is a teddy bear.
This gives Karen as a subject and gift as the object of the sentence.
Is this right?
As Barid Baran Acharya said, your last two sentences are a paraphrase; you cannot assume that they have the same grammatical structure as the first sentence.
Also, you have overlooked the fact that your paraphrase is two sentences.
The first sentence of your paraphrase “Karen gave the gift to her brother”, has the subject “Karen” and the object “the gift”, but the second sentence, “That gift is a teddy bear,” has the subject “that gift”.
The complex sentence you ask about in your question (“The gift Karen gave to her brother is a teddy bear”) is closer in structure to the second sentence of your paraphrase. So the subject of “The gift Karen gave to her brother is a teddy bear” is the noun phrase “The gift Karen gave to her brother”. It is not “Karen”.
“Karen” is the subject of the embedded relative clause in the sentence: “Karen gave ___ to her brother”. I have left a blank space there that corresponds to the direct object of the relative clause. The direct object of the relative clause is not explicitly present, but is understood to be the gift that is mentioned earlier in the sentence.
The main clause of the sentence “The gift Karen gave to her brother is a teddy bear” has no direct object. It is a copular sentence where the subject “The gift Karen gave to her brother” is described with the predicate noun phrase “a teddy bear”, with the linking verb or auxiliary “is” used to connect the two (noun phrases cannot be used as predicates in English by themselves).