Almost 70 per cent of Unite members who took part in the ballot favoured industrial action.
The vote came after the union accused tram management of “harsh and unjust” disciplinary action against employees.
It said staff were being subjected to a hostile and bullying management culture, including victimisation, suspensions and dismissals.
Unite regional officer Lyn Turner welcomed the ballot result and warned that if the strike action went ahead it was likely to take place in the run-up to Christmas and to New Year “including New Year’s Eve”.
It would be the first strike action to hit Edinburgh’s trams since they started running in May 2014.
But Mr Turner said he hoped talks between the union and tram bosses would lead to a resolution of the dispute before that.
The ballot had an 88.9 per cent turnout, with 69.6 per cent voting in favour of a strike and 30.4 per cent against.
Mr Turner said: “This result gives our members a resounding mandate for action.
“We are currently in talks with management and are hopeful that we can come to a sensible agreement which fully addresses our members concerns and avoids the need to take action.
“Unite does not want to play Scrooge by interrupting Christmas travel for Edinburgh’s citizens, but we need management to recognise that our members have legitimate concerns that must be addressed.
“We have met with senior management for the last two weeks, discussions have been progressing and we hope management see sense so all this can be put to bed and the drivers can get back to what they do best - driving trams.”
The union raised a collective grievance over the problem of “inappropriate use of disciplinary measures” in August and held a consultative ballot last month which produced an 83 per cent vote for industrial action.
Unite accused management of resorting too quickly to the disciplinary process rather than trying to deal with issues in a more constructive way.
Mr Turner said: “A hostile and aggressive management culture does not deliver a safe and productive workplace, nor does it indicate dignity and respect in its treatment of workers.”
A spokesman for Edinburgh Trams said: “We are continuing to engage in productive conversations with Unite to better understand their concerns.
“We are very hopeful we will be able to resolve the dispute in the near future without the need for industrial action.”
Tory transport spokesman Councillor Nick Cook said: “With a high turnout and strong percentage in favour of strike, Unite has demonstrated fair grounds for industrial action. Their concerns should be heard.”
“However, this strike will be calamitous for the Edinburgh economy and all steps must be taken to avoid it. I urge both sides to get round the table and thrash out a deal, for the good of the city.”