The two sides looked evenly matched throughout the first half of Tuesday night's Champions League encounter at the Etihad Stadium, however the Citizens got into their stride after the restart and broke the deadlock through Kevin De Bruyne in the 48th minute.
Nonetheless, the hosts had to wait until the 90th minute before making the result safe through Raheem Sterling.
"A lot of credit to what we have done. The way Shakhtar play, they demand a lot of us but our high pressing was brilliant," Guardiola told BT Sport after the game.
"We had problems in the first half, we did not make enough passes in a row but the second half was much, much, much better. We are so, so happy for the win.
"They were very narrow and there was little space in between but then our full-backs were able to dictate and created a lot of chances for another four or five goals.
"Even at 1-0, we were stable. We did not score goals but it was a demanding game. The next game against Napoli will be even tougher."
The result puts Man City at the top of Group F with two wins out of two.