Middlesbrough came from behind to win a closely-fought encounter at the Riverside Stadium as the Hatters dropped down to 13th place in the Sky Bet Championship.