An evenly-contested encounter at the Stadium of Light looked to be heading for a goalless draw, but Daryl Murphy made the most of a Tyias Browning error in the 86th minute to hand the visitors all three points.
The result marked the fourth league defeat in a row for the Black Cats and leaves them 20th in the Championship table with just five points to show from their opening seven games.
"It is probably the most frustrating result we have had, we didn't deserve to lose that game," Grayson told reporters afterwards. "The players responded from Saturday (a 2-1 home loss to Sheffield United) and showed bravery with and without the ball as we'd asked them to do.
"It was a big kick in the teeth to lose a game like that. We didn't get the breaks in the 18-yard box and the one mistake we make we get punished for. That can happen when you are losing games.
"There was a lot of positive signs from the team, I was happy with the response from Saturday. Sometimes in this position you don't get the breaks but that will change very quickly, I am very confident in this group of players. They showed what they can do.
"100% things can change quickly. I have just seen the table and a win Saturday can take you up to halfway up the division.
"Anybody can beat anybody on a single day. It is a 46-game season, a long hard slog. We have had key players missing, we will get them back and it will make us a stronger squad."
Next up for Grayson's men is a trip to Hull City on Saturday afternoon.