WASHINGTON — President Trump showed an affinity for “working the referees” in his race to the White House, criticizing a federal judge as biased, panning polls as rigged and even questioning the aptitude of the nation’s intelligence agencies.

Now, with Mr. Trump’s administration aggressively pitching the House Republican plan to repeal and replace the Affordable Care Act, Capitol Hill’s official scorekeeper — the Congressional Budget Office — is coming under intense fire. As it prepares to render its judgment on the cost and impact of the bill, the nonpartisan agency of economists and statisticians has become a political piñata — and the latest example of Mr. Trump’s team casting doubt on benchmarks accepted as trustworthy for decades.

“If you’re looking to the C.B.O. for accuracy, you’re looking in the wrong place,” Sean Spicer, the White House press secretary, said on Wednesday, arguing that the agency’s failure to accurately project enrollment in the Affordable Care Act’s online marketplaces had essentially killed its credibility.

Mr. Spicer’s criticism echoed that of some House Republicans who raised questions this week about the C.B.O.’s record.