Jerome Boateng scored the only goal of the game in the 89th minute on an evening where the Premier League champions spent most of their time on the back foot.
"They played better for the first 20 minutes and we played better for the rest of the game," Guardiola told Sky Sports News. "We deserved this victory. In the second half we played at a very high level.
"We can't forget against which team we played tonight and I'm happy with the rest because it is the first game in [a busy] two months.
"It was Rafinha's first game in two months. He had been out injured so he played with a big heart and the rest of the players played at a good level."
The other game in Group E saw Roma thrash CSKA Moscow 5-1.