Paulo Fonseca's side were made to pay for a slow start as Roman Kienast smashed in Vienna's first goal of the group stage so far after 11 minutes.
Porto dominated thereafter but only had Jackson Martinez's header shortly after half-time to show for it by the end when they were booed from the pitch by the home fans.
That meant they failed to capitalise on second-placed Zenit St Petersburg's earlier 1-1 draw against Atletico Madrid to leave the Portuguese side a point adrift.
With a trip to Atletico to come to round out their campaign, Porto face the prospect of dropping into the Europa League.
Vienna had revived their own unlikely hopes of reaching the knockout phase when Kienast punished sloppy defending from Porto full-back Danilo.
His clearance from the touchline into the centre of the pitch found only Kienast in acres of space. The striker had the time to take a couple of touches and size up a right-footed blast from just outside the area that left Helton with no chance of making a save.
Porto almost immediately responded with Martinez doing well to cushion a looping header that hit the crossbar and went over.
But unthinkably Vienna almost raced down the other end and grabbed a second. Only a last-gasp Lucho Gonzalez tackle on Philipp Hosiner denied them.
Hosiner was allowed a free run into the area and after easily beating the first defender to belatedly react to the danger, it took Lucho's desperate challenge to clear as he was about to pull the trigger.
The home side's frustrations grew as Vienna's Heinz Lindner then thwarted them with some astute goalkeeping.
When Porto scythed open the Vienna defence with a flowing one-touch move, Lindner was out quickly to save from Steven Defour on the angle. The young Austria keeper was then perfectly placed when Martinez flicked on Lica's dangerous low cross.
Lindner's opposite number Helton was little more than a spectator for the remainder of the half, but Porto were unable to turn one-way possession into an equaliser before the break.
Fonseca made an attacking change at half-time with Silvestre Varela replacing Defour. Three minutes later his side were level through Martinez's close-range header.
Josue's corner found its way to the back post where Eliaquim Mangala looped a header back across the face of goal. Martinez outjumped his marker on the line to direct the ball in.
Porto sensed the chance to make a decisive burst but again Lindner was in the way, blocking when Lucho helped on Josue's fizzing centre with his chest.
Vienna's only threat was on the break. Kaja Rogulj burst onto a James Holland through-ball but with men in support tried a shot that Maicon blocked well.
Porto began to show signs of panic and after some pin-ball in the away area Martinez and Varela both went for a shot that the substitute eventually saw deflect off a defender and over.
Lucho turned over a Josue cross at full-stretch while a Martinez header hit the back-tracking Mangala to take the ball off target and sum up the home side's night.