Boufal joined Saints in a club-record deal worth £21 million ($35.39 million) last northern summer and the Morocco international's moment of magic proved decisive at St Mary's in a game of few clear-cut chances.
Southampton's victory moves them up to 10th in the table while Middlesbrough remain 16th, after just one win in five games.
Boufal has taken time to settle since initially arriving injured from Lille but the 23-year-old is a precocious attacking talent and manager Claude Puel will hope his brilliance here, worthy of winning any game, is just the beginning.
The odd goal was always likely to settle this contest considering both teams have averaged less than one a game in the Premier League, with Southampton managing only 20 shots on target in their last six before kick-off and Boro a league-low 36 all season.
If that was not enough, they each had to do without their top goalscorers too. Southampton's Charlie Austin was sidelined due to a shoulder injury, while Alvaro Negredo sat out for Middlesbrough having picked up a hamstring strain against Hull City.
For the visitors, it meant only a second start of the season for Jordan Rhodes, bought from Blackburn for £9 million ($15.16 million) in the January transfer window but who has so far failed to convince Aitor Karanka of his talents. The 26-year-old endured another forgettable afternoon, doing little to suggest he is set for an extended run in the team.
Both sides were content to stroke the ball around early on but the only damage done was to the face of Boufal, after a jostling Adam Clayton had flung back his hand, although it appeared accidental despite the forward's protestations.
Southampton gradually settled into the ascendancy but they lacked any sense of purpose and when Jose Fonte sent yet another pass back towards his goalkeeper, the home crowd finally expressed their impatience with a collective groan.
Jordy Clasie and Jay Rodriguez each failed with snap-shots but by far the best opening of the half fell to Middlesbrough and it stemmed from another backpass, this time underhit by James Ward-Prowse.
Viktor Fischer raced through on goal but despite evading the lunging Virgil van Dijk and rounding goalkeeper Fraser Forster, Fischer's angled shot was scrambled off the line by Fonte.
Boro forward Cristhian Stuani added to the momentary mayhem with two quickfire follow-ups but the first was blocked and the second blazed over the bar.
That was the high point in an otherwise uninspiring 45 minutes, the end of which was greeted by a smattering of boos from Saints supporters.
Puel responded by replacing Dusan Tadic with Nathan Redmond at the interval and the substitute made an immediate impact, his cushioned header back setting up Boufal for a shot which was blocked.
Boufal continued to look the most likely source of a goal and in the 53rd minute so it proved as the forward, 25 yards out, took one touch to receive the ball, another to tee himself up and a third to hammer it with his left foot past Victor Valdes.
Steven Davis could have put the result beyond doubt but failed to connect with Cuco Martina's cross before Rodriguez saw his late header nodded off the line by Clayton.
Rodriguez then appeared to defy physics in injury-time when he sidefooted Redmond's cross over from a yard out.