Three Democrats familiar with the campaign said Parrish, a first-time candidate, faced long odds against Trivedi, who had built up support and name recognition despite two double-digit losses.
National Democratic leaders had edged toward Parrish and helped raise money for him, but Trivedi won backing from local party organizations in Chester County - which accounts for the largest share of the district's voters - and Montgomery County. The district also includes parts of Berks and Lebanon Counties.
"An expensive and contentious Democratic primary fight would seriously risk our party's ability to win this seat in November," Parrish wrote to supporters Tuesday. "I am therefore suspending my campaign in order to join with Manan Trivedi to help ensure that a Democrat is elected."
Trivedi said in a statement that he was "honored" to have Parrish's support.
Republicans said Parrish's decision showed that Democrats' chances were sinking fast.
"It seems like just yesterday that [Democrats were] sending out memos touting Mike Parrish's candidacy and flying Nancy Pelosi in to fund-raise for him," said Ian Prior, a spokesman for the national Republican campaign arm. "Just a few weeks later, however, Parrish has seen firsthand how difficult it is running straight into the massive headwinds caused by Obamacare. It's certainly understandable that he would want to jump ship."
Former Rep. Patrick Murphy, of Bucks County, who knows Parrish through mutual military ties, said the former candidate made a "selfless" decision.
"If we have a divisive primary, it's going to hurt us in the fall," said Murphy, a Democrat. "He thought he would take a step back and throw his support behind Manan."
With Gerlach retiring, Democrats have grown more hopeful about their chances in the district, which has more partisan balance than most. It is one of the top 35 districts where they are targeting GOP seats, though on the second tier of that list.
But the district still tilts Republican, and most political analysts predict a strong year for the GOP overall.
Parrish was a registered Republican until December. His allies saw his party change as a sign of his centrist credentials. Now Democrats hope Trivedi, who lost to Gerlach by 14 points in 2010 and again in 2012, can turn a third run into a victory.
"Manan Trivedi is a strong, independent advocate for Pennsylvania's middle class and over the last few months has put together an impressive campaign," said Marc Brumer, a spokesman for Democrats' national congressional campaign arm.
Republicans have pointed to a recent special-election win in Florida as a sign of their strength in the midterm elections, in which the president's party typically loses seats.
Murphy, however, said Gov. Corbett's poor poll numbers could hurt Republicans in the Philadelphia region.