It was the home side’s first defeat at the Riverside since the opening day and will have stung their own Spanish boss Aitor Karanka.
Boro had weathered an early storm to take control and carve out the best of the chances in the second half and seemed well in control when the Seagulls won a disputed corner with four minutes remaining, from which Upson scored.
Brighton took advantage of a jittery Boro defence to carve out the best of the early chances.
They won a corner on 10 minutes and when it sailed to the far post striker Ashley Barnes was unmarked but his angled header came back off the post then was scrambled away.
The loose ball was chipped back and a poor back header by Jonathan Woodgate sent keeper Shay Given furiously back-pedalling to tip over.
Brighton threatened again on 18 minutes when a cross from lively winger Craig Conway from the left was glanced on by a defender to David Lopez in space at the far post but his low shot on the turn was weak and straight at Given.
Boro had their first real chance on 26 minutes as Grant Leadbitter and George Friend combined down the left to pick out winger Mustapha Carayol on the edge of the box and his low 20 yard effort sent keeper Peter Brezovan scrambling to the near post to push it behind.
Boro then enjoyed a good spell of possession that had the visitors penned in their own box and went close as a shot from Rhys Williams clipped a team-mate and went wide.
On the stroke of half-time Boro threatened again as Friend crossed from the left but unmarked striker Lukas Jutkiewicz sent his harmless eight-yard header looping straight into the keeper’s arms.
Brighton pressed first after the break as Conway carved down the right to cut the back and over-lapping full-back Ward hammered in a shot that Given was forced to tip over.
Boro’s first real chance came on 55 minutes as Carayol hassled and robbed Bruno on the left flank then slotted the ball inside for Butterfield to touch on and Leadbitter sent a 25-yard effort wide.
That sparked a lively spell for Boro. George Friend got into the box from the left and drilled across the face of the goal to the far post where it was hacked off the line by Upson. Carayol stabbed the rebound towards goal but it was deflected behind for a corner.
And when Grant Leadbitter’s corner was only half-cleared, Albert Adomah drilled in a low shot from the right which was saved.
Boro went close on 66 minutes as Adomah whipped in a cross from the right to the far post where Jutkiewicz put a diving header just over.
Then on 70 minutes Jutkiewicz did well to hold off a defender on the edge of the box and send a shot on the turn just wide of the far post.
But Brighton snatched the points against the run of play on 86 minutes when they won a disputed corner. Upson connected with a downward header that bounced up and inside the post.