The 17-year-old Italian curled the ball past Brad Friedel in injury time to ensure the defending champions ended the weekend a point ahead of Liverpool at the top of the standings with a game in hand. Cristiano Ronaldo scored United's first two goals.
"This is a day of my dreams," said Macheda, who replaced Nani in the 61st.
Macheda was in the squad because striker Wayne Rooney was suspended and Dimitar Berbatov is injured. He entered after Gabriel Agbonlahor put Villa ahead 2-1 in the 58th by heading in a cross from John Carew.
"It was a gamble. Winning is the name of the game at this club," United manager Alex Ferguson said of inserting the inexperienced Macheda. "Yes we take risks, but that is part of football. I love the thrill of them myself."
The stage was set for Macheda after Ronaldo equalized in the 80th by slotting the ball past Friedel.
Ronaldo scored his first goal from a free kick in the 15th minute, and Carew equalized in the 30th.
Liverpool had won in injury time Saturday to move ahead of United and into first place overnight.
United has 68 points, one more than Liverpool and four more than Chelsea, which beat Newcastle 2-0 Saturday.