Mata was credited with the decisive strike at Old Trafford after his 59th-minute cross from a free-kick appeared to bounce straight in, although Rojo celebrated as if he had got a faint touch.
There was great drama in injury time as David de Gea produced two brilliant saves to deny Mame Biram Diouf and Marko Arnautovic, before Ashley Young then sensationally cleared off the line from Diouf.
It secured a fourth successive Barclays Premier League win for United - who had been without captain Wayne Rooney - but only by the skin of their teeth.
Marouane Fellaini headed the hosts ahead midway through the first half but Steven Nzonzi equalised before the break with a superb strike.
Fellaini was also involved in a moment of controversy in the build-up to the 39th-minute Stoke leveller when he appeared to claim he was kicked in the neck by Oussama Assaidi.
The Belgian, who also spurned a good chance soon after, was still holding his neck at half-time but replays suggested Assaidi had made no contact in that area.
Rooney was still feeling the effects of banging his knee on an advertising hoarding at the weekend and United were also without record signing Angel Di Maria.
That gave youngster James Wilson a chance to play up front alongside Robin van Persie while Ander Herrera also started, but the hosts were subdued in the early stages.
It was not until they were gifted an opportunity after 17 minutes that they came to life, as Stoke goalkeeper Begovic passed to Van Persie.
The Dutchman powered into the box and pulled back to Herrera but the Spaniard was too hasty and shot over.
Herrera quickly made amends for that miss as four minutes later he collected a pass from Mata and lofted a dangerous cross for Fellaini at the back post.
Erik Pieters failed to pick up the Belgian, who timed his leap superbly to head past a helpless Begovic.
United also had a good appeal for a penalty turned down as Wilson appeared to be kicked by Geoff Cameron but referee Jon Moss gave nothing.
Stoke tried to respond and Pieters whipped in a good ball from the left looking for Stephen Ireland or Bojan Krkic, but Rojo intervened.
It was clear Stoke were not prepared to surrender in the manner Hull did at the same ground on Saturday and they pulled back level before the break.
Controversy arose as Fellaini went down clutching his neck as Assaidi won a 50-50 ball
Assaidi may have caught the United midfielder on the hand or top of the thigh in the challenge but not his neck, as the Belgian appeared to claim.
Whatever occurred, Moss saw nothing untoward and both sides played on.
Bojan ran at the heart of the United defence and was crowded out as he reached the edge of the area
United failed to clear, however, and the ball ran into the path of Nzonzi, who lashed home a fierce shot from just inside the 'D'.
Fellaini continued to hold his neck but it did not seem to be affecting him just before half-time as he went close to restoring United's lead.
United won a free-kick outside the box on the right and a shot from Van Persie took a deflection and found its way to the Belgian in front of goal
This time he scuffed a shot and Begovic saved at the second attempt.
Stoke, who lost Steve Sidwell and Glenn Whelan to injury at the weekend, had another scare early in the second half when Pieters needed lengthy treatment after a clash with Van Persie.
That incident occurred during a scrappy spell but United reclaimed the lead just before hour as Mata floated in a free-kick from the right
The ball appeared to dip over everyone in the area and bounce in at the far post, although Rojo claimed to have got a touch.
Wilson, the 19-year-old who scored twice on debut last season, almost scored a third for United after a good run from just inside the Stoke half but he clipped his shot just wide.
Wilson made another charge but was crudely hacked down by Ireland, who was booked
Another good break led to a chance for Fellaini but he blasted wide.
United were almost made to pay for those misses in a breathless four minutes of injury time.
But De Gea, who had had a quiet game, remained alert to the last as he kept out a Diouf header and a powerful Arnautovic strike
The latter seemed to no avail as the ball rolled along the line to Diouf, but Young dramatically hacked clear from under the crossbar.
Source : PA
Source: PA