Mayor Marion Barry's effort to eliminate water-billing problems in the city ran into trouble on Capitol Hill yesterday when his plan to spend $6.3 million for improvements in the water department was criticized as an election-year ploy.

"I noticed that Mayor Barry criticized the Walter Washington administration for not being able to get out water bills," said Rep. Julian Dixon (D-Cal.), chairman of the House District appropriations subcommittee. He questioned whether the plans outlined yesterday were "an accelerated effort to demonstrate that he Barry can do it."

Dixon's comments came after an hour-long hearing on the city's plan to reallocate $6.3 million in federal funds in its fiscal 1983 budget. That money was approved by Congress last year for repayment of water and sewer construction loans, but the city wants to use $2.8 million to buy24,000 water meters, $1.9 million to increase pay for Department of Environmental Services employes and $1.6 million for unspecified improvements in the water services division.

"The mayor feels he has a commitment to the community to make sure we're not plagued by bad water bills," city budget director Gladys W. Mack told the congressmen.

Annette Samuels, Barry's press secretary, said the reprogramming was not a campaign effort. She said the mayor made the request in order to carry out "ongoing improvements in the water department."

As a mayoral candidate in 1978, Barry pledged to end the city's water billing problem in six months. However, until late last year, Environmental Services' water revenue division failed to send out timely and accurate bills consistently.

The city recently began running television announcements encouraging residents to call DES to report problems with their water bills. By most accounts, the department has improved its service and cut late billings, although there have been a few highly publicized incidents of huge, inaccurate residential bills.

Committee members said yesterday they were impressed by that progress, but they showed little sympathy for the request for additional funds.

"Everyone knew the meters were no good a long time ago," Rep. John E. Porter (R-Ill.) said at the hearing. "I fail to see why this has to be done immediately . . . . My feeling is that we ought to oppose the reprogramming."

Rep. Lawrence Coughlin (R-Pa.) said the money should be used for its original purpose. The subcommittee will vote on the question in two weeks.

William B. Johnson, director of DES, said the new meters--which will be used to replace aging commercial and residential units--are crucial to improvements in the water billings. Many of the current meters, he said, are more than 25 years old.

"We are turning the system around," Johnson said. "But we need some more money." Otherwise, he added, "we'll just crank out bad bills."