The Blues were in real danger of seeing their hopes of safe qualification from Group E suffering a severe dent as one-time transfer target Willian struck in each half to cancel out goals from Fernando Torres and Oscar following howlers from Shakhtar goalkeeper Andriy Pyatov before Moses' late strike.
"In terms of the timing of the winning goal, you probably could agree that there was an element of luck. It was basically the last kick of the game," said Di Matteo, who had elected to leave captain John Terry on the bench.
"At the end, when you get a win and you've played against a good team, we deserved to win.
"We did a lot of good things, put them under pressure particularly in the first half, and that's how we scored the two goals: by applying pressure on them. I think we deserved to win, ultimately."
Di Matteo added: "It was always going to be a difficult game. They are a very good side and have a lot of good individual players, and play as a team very well.
"They have shown that in all the games they have played. It made it difficult to go ahead twice and not hold on. We need to work on these things to see out games."
Chelsea are now level on points at the top of Group E ahead of their final two games, away to Juventus and at home to whipping boys Nordsjaelland.
And Di Matteo admitted Wednesday night's win puts a whole new complexion on the remaining matches for all sides in the group, with Juventus only a point behind.
"This is not going to make things easier, but it is going to give us a good chance to qualify because I think, like this, the last game will be crucial between Shakhtar and Juventus when they play each other," said the Italian. "We need some points from our last two games, and to win the last game for sure."
- Sports & Recreation
- Di Matteo