It could lead to stoppages affecting Sunday trains and a ban on working days off.
Conductors represented by the Rail Maritime and Transport union (RMT) voted by 353 to 117 to take strike action.
They also voted by 403 to 68 for action short of strikes.
A total of 472 of the 631 staff involved voted – a turnout of 75 per cent.
The ballot was triggered by the agreement between ScotRail and drivers’ union Aslef for drivers to be paid extra for working on days off being extended from January to October.
The RMT was angered by the move, which followed its members being told they would not be getting a pay rise at a time when drivers are benefiting from the second year of a previously-agreed two-year increase.
ScotRail is being run under an emergency measures agreement involving extra funding from the Scottish Government’s Transport Scotland agency, with support nearly doubled to approaching £1 billion a year.
It has been needed to keep the railways operating when passenger numbers have fallen by 90 per cent because of the Covid travel restrictions.
RMT Scottish organiser Mick Hogg said: “This result will hopefully focus ScotRail and Transport Scotland to meet the RMT and make an offer, not only on pay but on rest day working, thus treating all employees fairly and equally.
"ScotRail calls itself an equal opportunity employer yet treat the majority differently.
"Hopefully, this result gets ScotRail back to the negotiating table.”
The RMT is considering the ballot result.
ScotRail operations director David Simpson said: “This is a disappointing and frustrating result.
"It is the wrong decision for conductors, who will lose money through any action without gaining anything in return, and wrong for our passengers.
“The most important point to note is that the result will have no impact on our position on rest day working.
"Strike action will not deliver a new agreement being reached with conductors – it isn’t required, and the finances don’t allow it.
“We will work hard to minimise any impact on the passengers using our services, particularly the key workers who are reliant on us.”
A Transport Scotland spokesperson said: “We understand the frustrations felt with regards to pay negotiations, particularly as rail staff have been instrumental in keeping services moving for key workers.
“Rail unions previously agreed that pay negotiations would be deferred until we have more certainty of the budget implications of the current emergency arrangements.
“Aslef has subsequently agreed to a short-term extension of existing arrangements for rest day working for drivers.
"This cooperation helps address potential driver shortages and, with that, service cancellations, due to the suspension of in-cab training during the pandemic.
“We appreciate other grades are waiting on pay negotiations to restart but we are unable to progress longer-term pay arrangements until we have more certainty of the financial outlook.
"Our commitment to take those discussions forward at the appropriate time remains.”