The decisive goal came after two minutes, the hapless Inigo Martinez diverting into his own net after the excellent Wayne Rooney had struck the post.
Both sides hit the woodwork thereafter, Sociedad on two occasions, but unlike in Saturday's 1-1 draw with Southampton, United were spared the pain of shipping a late equaliser.
"It was a job well done, a good performance," Moyes said. "I was frustrated we couldn't kill them off because we had the same on Saturday, with a goal in the last minute.
"Today we had that feeling around us, but if we had scored five or six today it wouldn't have been out of place. We had an awful lot of opportunities and didn't finish it off.
"We gave away a couple of free-kicks on the edge of the box, and I was concerned about that. A couple of the decisions didn't quite go our way tonight, but it was a good result. We had to win the game at home."
Shinji Kagawa, making just his fourth start of the season, made a strong impression both with the fans - and his manager.
"I thought it was Shinji's best game in my time here," Moyes added.
"He hadn't really found his feet yet but I saw something from Shinji tonight which I hadn't seen in other games, so I was really pleased."
Moyes also was impressed with the performance of Wayne Rooney, who produced a display full of graft and guile.
"I was going to say he was back to the old Wayne Rooney but it might be better to say he is the new Wayne Rooney," his manager said.
"He came back in great condition, trained really hard. I really couldn't explain how hard he has worked. He has been incredible.
"Hopefully, in the end, Manchester United will benefit and England might as well."
Real Sociedad coach Jagoba Arrasate admitted his side could have few complaints, adding: "It makes life difficult when you go 1-0 down so early on. When it is a terrible mistake like that, a really disastrous goal to concede, it affects you.
"We tried very hard to get an equalising goal but you have to say it was a fair result."