The 17-year-old tapped home in the 90th minute on Saturday after good work from Elliot Lee to ensure Sam Allardyce's men recorded their second close-season success.
West Ham twice came from behind before substitute Burke's late heroics, Mark Noble and Mohamed Diame cancelling out goals from Stefano Okaka and Eder.
The home side had the best of the opening stages and Nolan forced a good save from Sampdoria goalkeeper Angelo da Costa in the third minute.
Nolan pounced on a poor clearance and produced an acrobatic overhead kick that Da Costa did well to keep out.
But it was the Serie A side who broke the deadlock in the 16th minute when Eder played in former Fulham loanee Okaka, who did well to hold off defender James Collins and slot past Adrian.
The Premier League side hit back from the penalty spot right on the stroke of half-time after Lorenzo De Silvestri tripped Dan Potts, with Noble making no mistake from 12 yards.
Sampdoria retook the lead on the hour mark when Brazilian Eder excellently created space between West Ham defenders Collins and James Tomkins and stroked the ball into the net.
But West Ham equalised again in the 77th minute when Diame ran past two Sampdoria defenders and finished confidently past Da Costa.
Allardyce's side could have taken the lead two minutes later when Stewart Downing's header from a Ricardo Vaz Te cross rebounded off the bar, but it was Burke's late finish that secured the win for West Ham.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.