The Bees, without a win this season, dominated the first half for long spells and went in front in the ninth minute after Keiren Westwood failed to hold on to Nico Yennaris’s tame volley.
However, Brentford were left to rue missed chances as Gary Hooper equalised on the stroke of half-time.
And winger Ross Wallace completed the turnaround after the break, grabbing a 70th minute winner.
Victory extended the Owls’ unbeaten league run to six matches and moved them into the Championship play-off positions.
Head coach Carlos Carvalhal said: “We were a little lucky, just like Brentford were here last season when they won 2-1.
“I knew it would be a very difficult game as they are in a false position in the division. We are a team with a big heart and that’s why we won.”
Next up for the Owls is a trip to second-placed Cardiff City this Saturday.