The Spain striker found the net from 20 yards in the 89th minute to spark wild scenes at Stamford Bridge, with Conte celebrating among supporters.
Eden Hazard had put the Blues in front from the spot after Michail Antonio fouled Cesar Azpilicueta.
James Collins levelled for the Hammers, but Costa's finish settled it.
After a disastrous start to last season, which led to Jose Mourinho's sacking in December and a 10th-place finish, Conte's arrival at Chelsea will at the very least inject passion and animation into a side routinely accused of lacking commitment last term.
The former Juventus coach, where he won Serie A three times, is fresh from taking Italy to the quarter-finals of Euro 2016, where he displayed tactical nous alongside animated touchline antics.
And Chelsea supporters hugged their new manager in delight as he sprinted along the front of the stands following Costa's low shot had crept into the net.
But the 27-year-old had been fortunate to still be on the pitch when, having already been booked for remonstrating with the referee, he escaped a second booking when he caught Hammers keeper Adrian high up on the shin with a late challenge.
EmoticonEmoticon