Sunderland fell into the Championship bottom three on another bitter afternoon at the Stadium of Light.
After a woeful start and a goal for Craig Bryson, Lynden Gooch put the Black Cats back on level terms before Joe Ralls sealed the three points for the visitors with a penalty.
The first goal has been crucial so often at the Stadium of Light and was likely to be so again, the visitors such a powerful counter-attacking outfit and with an excellent defensive record.
To give away such a soft opener, then, just seven minutes into the contest, left the Black Cats with a mountain to climb and the sparse crowd sadly, understandably flat.
A goal-kick from Neil Etheridge was easily won by Kenneth Zohore. His flick-on found Nathaniel Mendez-Laing in space, his first time volley over the shoulder met by Craig Bryson, whose run was not tracked by any opponent.
His volley rolled past Robbin Ruiter, and with Mendez-Laing in particular punishing Bryan Oviedo, it looked as if the lead would increase soon after. Joe Ralls fired wide from the edge of the area as Cardiff continued to threaten.
Grayson acted quickly, moving Oviedo up the pitch and his side into a 4-4-2 shape.
They did improve from there, the Costa Rican hitting the post with a long-range effort, but Cardiff, killing time at every opportunity, were comfortable.
To Sunderland's credit, they continued to improve as the second half began, despite some moments of promise from the ever impressive Mendez-Laing. Lynden Gooch forced a good save from Etheridge with a low effort across goal, and just moments later they were level. Having drawn a foul from Sean Morrison as he broke into the box, Gooch got up to convert the penalty in confident fashion.
Stung by their poor start to the half, both Bruno Manga and Bryson tested Ruiter soon after but the Dutch stopper proved equal to the task.
Grayson had introduced Aiden McGeady as the Black Cats searched for a long-awaited home win.
They looked the more likely, until Lamine Kone conceded a soft penalty as he pushed Sean Morrison from a corner. Joe Ralls dispatched the penalty confidently to put the Bluebirds back in front. It was almost three just minutes later, substitute Junior Hoilett getting free in the box but firing into the side netting.
Steadied by their second goal, the visitors were largely untroubled as another home game ended with chants against the ownership of Ellis Short and general dismay as the Black Cats fell into the bottom three.