Dennis Praet cancelled out a Henrikh Mkhitaryan header to leave the two teams level in the second period, before Juan Mata netted in the 81st minute as Jose Mourinho's side recorded their sixth pre-season win.
Nemanja Matic made his debut after joining the Red Devils from Chelsea earlier this week, while fellow summer signings Victor Lindelof and Romelu Lukaku were also included in a team that started in a 3-5-2 formation.
The first XI also included Chris Smalling, Daley Blind and Andreas Pereira, while Mkhitaryan was tasked with supporting Lukaku in the final third of the field as Mourinho selected an experimental side.
As for Sampdoria, the Italian side's line was led by 34-year-old forward Fabio Quagliarella, who netted 12 times in 38 appearances for the club last season. Gianluca Caprari was also given a spot in the final third of the field, while highly-rated Belgian midfielder Praet started in a deeper position.
Man United took the lead in the ninth minute of the match when Mkhitaryan headed a brilliant Matteo Darmian cross into the back of the net from close range, with the goal coming on the counter-attack following a bizarre moment down the other end.
Indeed, an overhit Blind back-pass forced David de Gea to handle inside his own box, which saw the referee award Sampdoria an indirect free kick. The set piece was smashed straight into the wall, however, and the English giants broke straight down the other end to take the lead.
Sampdoria had a decent chance to level in the 15th minute when Quagliarella lifted a looping effort towards goal - the ball beat De Gea, but dropped just wide of the Man United post.
Mkhitaryan came close to doubling his tally in the 22nd minute after meeting a brilliant cross from Valencia, but the attacker saw his close-range header kept out by Sampdoria goalkeeper Christian Puggioni, before Lukaku just missed the far post with a curling effort two minutes later.
Mkhitaryan, operating in a free role behind Lukaku, might have had a hat-trick in the first period, but he missed another clear opportunity 10 minutes before the break - heading a Valencia cross wide of the post after finding space once again.
Marouane Fellaini, Michael Carrick, Mata and Ander Herrera came off the bench at the interval, but Mourinho kept with the 3-5-2 formation, suggesting that could be an option for the European Super Cup against Real Madrid.
Herrera thought that he had doubled the lead in the 62nd minute when he smashed the ball home after strong work from Fellaini, but the offside flag was raised.
Instead of being 2-0 behind approaching the final 25 minutes, Sampdoria actually levelled the scores in the 63rd minute when Praet found the back of the net from the edge of the box after the ball had fallen nicely for the Belgian.
Phil Jones, Eric Bailly, Axel Tuanzebe and Joel Pereira were all introduced for the final 15 minutes of action, while Sampdoria boss Marco Giampaolo also made a whole host of changes in the second period.
Super work from Martial created an opportunity for Herrera to head Man United into the lead 10 minutes from time, but the Spaniard could not beat Puggioni as the score remained 1-1 at the Aviva Stadium.
The 20-time English champions scored their second in the 81st minute, however, when Martial drove into the Sampdoria box before feeding Mata, who stroked the ball into the bottom corner of the net.
Sampdoria's reserve goalkeeper Andrea Tozzo came off the bench in the 85th minute, and less than two minutes later, the Italian made two wonderful saves - keeping out efforts from Herrera and Rashford in quick succession as it finished 2-1 on the night.
Next up for Sampdoria is their final pre-season fixture against Swansea City this weekend. Man United, meanwhile, will now face Champions League winners Real Madrid in the European Super Cup on August 8.