If Her Majesty so desired, would she have been allowed to overrule the will of both the people and the House of Commons and prevent the triggering of Article 50?
If so, what political backlash would result from such an action?
Brexit requires legislation, which the Queen can veto; and the Queen also has prerogative over international treaties.
It was decided by the UK Supreme Court that the government cannot instigate Brexit at all without the approval of Parliament. Parliament has already passed an Act authorising the Prime Minister to trigger article 50 of the Lisbon Treaty and begin the formal process of leaving the EU. At that time, the Queen could have refused royal assent to the Act and stopped Brexit.
Now that the Act has received royal assent, there is no procedure for "unassenting" it; it could only be overruled by a further Act of Parliament.
However, the technical process of Brexit will require eight further Acts of Parliament, as set out in the Queen's Speech on 21 June 2017. In principle, any or all of these could be vetoed by the Queen.
Furthermore, the executive power of the British government to make and withdraw from international treaties is a royal prerogative, exercised on the Queen's behalf by the Prime Minister and Cabinet. If the Queen saw fit, then in theory she could use these powers herself. French President Macron has suggested the UK could choose to remain in the EU; the Queen could simply declare that she is exercising this option and cancelling Brexit by royal decree.
The government of the UK depends very heavily on unwritten conventions. If an action violates convention, it is not in any practical sense possible, even though the letter of the law may seem to allow it.
There is absolutely no recent precedent for a British monarch overruling Parliament in this manner. The last time a monarch vetoed a bill was more than 300 years ago, and that was not on a particularly momentous issue. (Specifically, Queen Anne withheld assent in 1708 from a bill on arming militia in Scotland.)
Other precedents did not end well for the monarch:
Queen Elizabeth II personally has been scrupulously neutral in party politics, throughout her reign of more than 60 years. It is exceedingly unlikely that she would change her approach now.
Unless the country was in such a state of crisis that it amounted to imminent or actual civil war, it is almost unimaginable that the Queen would interfere in politics in this way; or that the government, Parliament, and public opinion would tolerate such interference if she tried.
The Supreme Court ruled in January that Parliament must vote on whether to invoke Article 50 (although the devolved parliaments do not need to be consulted). The president of the Supreme Court, Lord Neuberger, stated
“Section 2 of the 1972 [European Communities] Act provides that, whenever EU institutions make new laws, those new laws become part of UK law. The 1972 act therefore makes EU law an independent source of UK law, until parliament decides otherwise.
“Therefore, when the UK withdraws from the EU treaties, a source of UK law will be cut off. Further, certain rights enjoyed by UK citizens will be changed. Therefore, the government cannot trigger article 50 without parliament authorising that course.”
Any bill passed by Parliament must gain royal assent, or the agreement of the monarch; if it doesn't, it will not be enacted. However, the Queen acts in these matters on the advice of her ministers, and the Government clearly supports Brexit. During the referendum for leaving the European Union, we were reminded that the Queen stays politically neutral:1
Britain is a constitutional monarchy with a queen who reigns but does not rule. She can’t vote and is expected to remain politically neutral.
“As Head of State The Queen has to remain strictly neutral with respect to political matters,” the palace says on its website.
So, yes the Queen had the power to stop the invocation of Article 50, had her ministers agreed (which they would not, of course); she gave royal assent to the bill in March. Doing otherwise would have been extremely uncharacteristic for a modern British monarch.
1 It has been stated that the Queen supports Brexit (which would, of course, make this whole thing moot), but Buckingham Palace has continued to emphasize the Queen's neutrality. She will act according to the will of the people, and the people have - by a small majority - spoken. The decision to leave the EU was contentious, and the result was slim, but it was a result nonetheless, arrived at democratically.
The Supreme Court ruled that the Prime Minister cannot bypass parliament to trigger Article 50, as mentioned in this article by The Telegraph.
Supreme Court justices ruled, by a majority of eight to three, that Prime Minister Theresa May cannot lawfully bypass MPs and peers by using the royal prerogative to trigger Article 50 of the Lisbon Treaty and start the two-year process of negotiating the UK's divorce from its EU partners.
[ ... ]
A one-line Bill is expected to be drawn up and debated in Parliament, and Mrs May will be hoping that if that is the case, the Bill can go through the Commons and the Lords swiftly before becoming law as an Act of Parliament.
So, a short bill was drawn up to trigger Article 50.
1 Power to notify withdrawal from the EU
(1) The Prime Minister may notify, under Article 50(2) of the Treaty on European Union, the United Kingdom’s intention to withdraw from the EU.
(2) This section has effect despite any provision made by or under the European Communities Act 1972 or any other enactment.
Since the Queen has to give her royal assent to bills, the Brexit bill requires her assent too which she gave in March this year.
As answered in this question, refusal of royal assent is rarely exercised, in respect of democracy. Since the people of UK voted to exit the EU, it's would be clearly against the people's will should she refuse to give her royal assent.