Ouch! This is hard, because you are right: both mean the same thing, and both are reasonable answers. But exam authors are often not reasonable, as I saw in a recent question.
Here's my attempt to second-guess the exam author. Usually people who demand precise, exam-testable definitions of "passive voice" say that the direct object in the active voice becomes the subject in the passive voice. In "My father promised me a gift", gift is the direct object, and me is an indirect object (sometimes called a "dative" by analogy with Latin grammar). Notice that me becomes the object of the preposition to in your first alternative. So, the exam author will probably want the sentence where gift is the subject:
A gift was promised to me by my father.
There's no way to be 100% sure, though. Good luck!