Newcastle''s former Bournemouth winger Matt Ritchie hit the post from distance while visiting keeper Asmir Begovic produced fine saves to deny Ritchie and Christian Atsu, and Dwight Gayle spurned another opportunity for the hosts.
"We have to understand that in these sort of games we have to do better," said Magpies boss Rafael Benitez.
"We have created chances in every game, you have to score. We have to keep going, we are Newcastle United, a good team that has been promoted."
Bournemouth also hit the woodwork through Marc Pugh before Cook met a late corner to power the visitors to victory.
Bournemouth have conceded late goals to lose on three occasions in the top flight this season.
They suffered the agony of letting in an injury-time goal to Manchester City, conceded twice in the closing stages to go down at Everton and were on the receiving end of an 86th-minute goal against Watford.
The Cherries rode their luck as Newcastle carved out chance after chance before fading, while Bournemouth finished strongly, with Pugh hitting a post after a mazy run before Cook''s winner.