St. Louis halted a two-game skid and handed the Hurricanes their first loss in four contests.
Carolina took a 2-0 lead early in the second period, but was shut down the rest of the way by Brian Elliott.
Elliott, given the start in place of the struggling Jaroslav Halak, has won both his decisions this season.
Jay Harrison scored the only goal of the first period for Carolina and Brandon Sutter made it a 2-0 lead 1:33 into the second period.
It remained a 2-2 game through the third period and a shootout appeared likely until D'Agostini tipped in a shot by Vladimir Sobotka. It was D'Agostini's third goal of the year.
Elliott made 27 saves.
Cam Ward faced 43 shots and stopped 40 of them to take the loss.