Adam Reach went closest to opening the scoring in the first half with a header against the crossbar, but it was Boro who took control after the restart with two goals in the space of six minutes.
Besic was integral, netting his second away goal in as many games with a neat finish across Cameron Dawson.
The midfielder turned provider soon after, teeing up Britt Assombalonga for a simple finish after Tom Lees' calamitous error enabled Boro to break.
But Wednesday rallied, Reach continuing his run of spectacular goals with a sensational 82nd-minute volley to set up a grandstand finish.
Jos Luhukay's men looked set to snatch a point in the final minute of stoppage time, Lees squandering the chance to atone for his earlier mistake as he failed to tuck home from point-blank range, Daniel Ayala's block ensuring Boro held firm amid a goalmouth scramble to return to the summit.