Members of the National Union of Rail, Maritime and Transport Workers (RMT) plan to take action on December 22 and Christmas Eve.
The action is in support of a ticket examiner who was sacked by ScotRail.
ScotRail called the strike a "clear attack" on commuters, but insisted that most trains would still run.
A company spokesman said: "We will get people home this Christmas."
RMT general secretary Bob Crow accused ScotRail of leading the union "up the garden path" during talks.