Andrea Orlandi scored direct from a corner to put the visitors ahead before Chopra's 18th goal of the season levelled things up. Substitute Shefki Kuqi spurned a great chance to put the visitors 2-1 ahead in the last minute, before Chopra struck to settle matters at Cardiff City Stadium as the Bluebirds took a big step towards securing a Championship play-off berth.
Desperate to avenge their 3-2 defeat at the Liberty Stadium earlier in the season, the Bluebirds were quickly on the attack and could have taken an early lead. A hopeful long ball found top-scorer Peter Whittingham who laid the ball back to Ross McCormack, but the striker could only curl over the crossbar.
Undeterred by the hosts' endeavour, the Swans began to fashion opportunities of their own with Nathan Dyer looking especially threatening.
The end-to-end nature of the game continued as McCormack's 20-yard strike was blocked by
Ashley Williams, before Swansea midfielder Orlandi saw his speculative effort sail over the bar.
When the deadlock was broken it came from the unlikeliest of sources. Orlandi sent over an inswinging left-wing corner which Cardiff keeper David Marshall could only parry into the net under pressure from Williams. Despite being at fault for the goal, Marshall had every right to feel aggrieved at the linesman's decision to give the corner as the ball did not appear to cross the line before he collected it.
Cardiff immediately pushed for an equaliser but Jay Bothroyd could only head McCormack's corner into the side netting.
It was Paulo Sousa's team who had the game's next real chance as Cedric Van der Gun found himself clean through before seeing his tame effort saved by Marshall.
And the Swans were made to pay for the miss as Chopra's predatory instincts restored parity. Stephen McPhail's hopeful free-kick was met by Bothroyd's excellent flick-on, allowing Chopra to poke home his first goal in nine games.
The former Newcastle striker nearly put his side ahead just before the break but he could only loop an effort over after racing onto McCormack's excellent pass.
Despite going in at half-time with the momentum in their favour the Bluebirds were sluggish after the break, and Swansea could have regained the lead had David Edgar shown more composure from 20 yards.
The hosts responded well as Chopra tricked his way into the box and fired an excellent ball, which no-one could get one the end of, across the Swansea six-yard box.
Neither side was able to establish a spell of sustained pressure but Van Der Gun found himself clean through before hitting a tame effort at Marshall.
A draw seemed inevitable as the game entered stoppage time, especially when Marshall denied Kuqi, who headed David Cotterill's free-kick straight at the keeper from 12 yards.
But Chopra grabbed a dramatic winner as Swansea failed to clear a long throw into the box. Anthony Gerrard headed the ball in the striker's pass and he coolly slotted to send the home fans wild.