Before Yaakov Avinu traveled to Metzrayim he brought korbanos to Hashem. The wording that the pasuk uses is that he shected korbanos to the God of his father Yitzchak. Rashi cites a Midrash that explains why the pasuk did not say that Yaakov shected korbanos to the God of his grandfather Avraham Avinu as well. The Midrash explains that this is because one is obligated to honor his father more than his grandfather.
The Rema (Yorah Deah 240:24) cites the opinion of the Maharik that one is not obligated to honor his grandfather. Additionally the Maharik states that he has never found a source that one must honor his grandfather. The Rema then cites this Midrash as a source that one is obligated to honor one’s grandfather. The Midrash only says that one must honor his father more than his grandfather. This implies that he is obligated to honor his grandfather; only that the honor of his father precedes. The Taz there wonders how the Maharik could have not known about this Rashi.
Rav Akiva Eiger (Teshuvos 68) quotes the Leviyas Chen who says that a person is actually obligated to honor his grandfather more than his father. The reason for this is based on a Gemara in Keddushin 31a and Yevamos 5b. The Gemara in Keddushin says that if one’s mother and father both command him to do different tasks, he should execute his father’s command first. This is because both the son and his mother are obligated to honor his father. Therefore by adhering to his father’s command he is in fact doing what his mother must do as well. Similarly the Gemara in Yevamos says that if one’s father commands him to do an avera he must not listen for both him and his father are obligated in honoring Hashem, who has commanded us not to perform averos.
Therefore, says the Leviyas Chen, since one must honor his father and both him and his father must honor his grandfather, the honor of the grandfather will take precedence.
Rav Akiva Eiger points out that this opinion is not contradicted by the abovementioned Midrash. In the Midrash Yitzchak was already niftar. Once a person’s father is niftar we can no longer apply the Gemara’s logic that both he and his father are obligated to honor his grandfather. This is because once his father is not alive the father is not obligated to honor his father any longer. Therefore at the time that Yaakov was bringing his korbanos, the honor of his grandfather was no longer greater that that of his father, rather his father’s honor took precedence. However in a situation where one’s father and grandfather are both alive, the honor for one’s grandfather would take precedence.
This point may not be in accordance with everyone. Rav Akiva Eiger is assuming that the logic of the halacha that both the son and his mother are obligated to honor his father and therefore he must honor his fathers wishes first, is a mathematical equation. Since they both have to honor him his request must take precedence. There is another approach to understanding this halacha. The fact that both the son and his mother are obligated to honor the child’s father could be an indication that the honor that a son has for his father is greater than that of the honor that he must have for his mother. It is not because by adhering his father’s request he is also fulfilling his mother’s obligation of honoring her husband. Rather it shows us that the honor for his father is greater.
When a couple is divorced, and the woman is no longer obligated to honor her husband, the honor for both is equal. But while they are married the honor for one’s father will supersede that of one’s mother because we know that both the child and the mother are obligated to honor the child’s father.