The finish spoilt a fine fightback from the Raiders, who trailed 18-6 midway through the second half but gave the Panthers an almighty late scare.
The Panthers have now won three of their last five games and are looking a finals contender despite their slow start to the season.
Ricky Stuart will be bitterly disappointed to have let the game slip away after his team's strong finish and the Raiders are likely to drop out of the top eight by the end of the weekend.
In a dramatic final five minutes, both teams missed field goal shots before Wallace nailed the one that counted.
The Panthers got off to a dream start, with back-rower James Fisher-Harris latching onto a loose Raiders kick and batting the ball on to fellow forward Bryce Cartwright.
Cartwright looked ahead and saw nothing but open space, racing 80 metres to score untouched after just seven minutes.
Jamie Soward added the conversion to get the Panthers off to a flying 6-0 lead.
But the Raiders hit back soon afterwards, with centre Joey Leilua showing his strength to create a try for his winger Joran Rapana.
Leilua stood in a two-man tackle and flicked the ball out the back to Rapana, who raced over for his seventh try in nine games this season.
Jarrod Croker's conversion locked the scores up at 6-all before the Panthers again edged ahead through the class of Cartwright.
The ball-playing back-rower was surrounded by four defenders, yet managed to slip a clever pass to utility Tyrone Peachey, who darted over to give the home side a 10-6 lead.
The Panthers should have gone further ahead when former Roosters and Warriors forward Suaia Matagi found himself in open space near the tryline and looked certain to score.
But a brave tackle from Raiders fullback Jack Wighton forced the ball from Matagi's grasp and the chance was gone.
The Panthers had to be content with a Soward penalty goal just before the break to extend the lead to 12-6 at halftime.
The Raiders could have edged closer midway through the second half but were denied two close calls.
Big forwards Paul Vaughan and Josh Papalii both got over the Penrith tryline but, much to Ricky Stuart's frustration, were unable to ground the ball.
The Panthers, meanwhile, had a chance down the other end of the field in the 56th minute and made it count.
Fullback Matt Moylan put in a smart grubber kick and centre Peta Hiku pounced, with Soward's conversion extending the lead to a commanding 18-6.
The Raiders bombed another chance to edge closer with 15 minutes to play, with a pass from Jarrod Croker to winger Edrick Lee going astray with the tryline open.
Canberra finally got back into the game with 11 minutes left when Vaughan - again one of their best - powered his way over for a simple try.
Croker's conversion put the Raiders back in striking range at 18-12.
The Panthers survived another close call when Edrick Lee charged at the line - but was controversially penalised for a double movement.
They drew level six minutes from the finish in spectacular style, with Rapana flying through the air to collect a bomb, setting the scene for the dramatic finish.
- news.com.au