The Dragons needed two points to stay in the eight with fast-finishing Manly nipping at their heels and it was halves Marshall and Widdop who stood up when it mattered most.
After scores were tied at 12-12 for most of second half, a deft Widdop kick allowed the Dragons to trap the Panthers in-goal and Marshall slotted a field goal the next set.
Seven minutes later, Widdop grubbered for himself and planted it to kill off any chance of a Panthers comeback.
Earlier, the home side grabbed an 8-0 lead after Peter Mata'utia exploited some poor Penrith goalline defence.
However, the Panthers wrestled back the ascendancy thanks to Jamie Soward's kicking game as David Simmons and Josh Mansour crossed to make it 10-10 at the break.
The Panthers are expected to be without Elijah Taylor for the rest of the season after he suffered a suspected broken arm.
Both sides were woeful, between them coming up with 27 handling errors (Dragons 12, Panthers 15), 16 penalties (Dragons 7, Panthers 9) and 42 missed tackles (17 Dragons, 25 Panthers).
Dragons coach Paul McGregor said there was not much to take out of the game except the fact they came away with two points to stay in finals contention.
"It was a scratchy win," McGregor said.
"But it was a win and we've won three of our last four so that's really important.
"It keeps us alive but we'll push that aside and look forward to the Titans."
Penrith coach Ivan Cleary said his side didn't respect the football and paid the price.
"We kept turning the ball over - that's what we did," Cleary said.
"Every time we had momentum or looked like something was going to happen, someone made a bad decision.
"We just didn't want to grind away."
- AAP