Baltimore Gas & Electric Co. yesterday agreed to become a partner in a coal slurry pipeline venture headed by Dominion Resources Inc., the holding company for Virginia Electric & Power Co.

The partnership, which also includes Transco Energy Co. of Houston and A.T. Massey Coal Co. of Richmond, plans to study whether it is feasible to construct a pipeline to carry a mixture of coal and water from the Appalachian coal fields to East Coast ports.

Dominion Resources formed a partnership with Transco a year ago to pursue construction of what would be the first coal slurry pipeline on the East Coast--a 30-inch pipeline that could move about 25 million tons of coal a year.

The pipelines proposed by the partnership called Virginia Coal Slurry Associates would terminate at Hampton Roads and Baltimore. Coal would be separated from the mixture, dried, then shipped by barge to power plants owned by BG&E and Vepco.

The slurry pipeline is strongly opposed by the railroads, which haul coal for the utilities. A commission studying the slurry pipeline issue is expected to report its findings at the next session of the Virginia General Assembly, a Dominion Resources representative said yesterday.

A spokesman for BG&E said the company has already completed a feasibility study of its own on a proposed pipeline that would carry slurry to the Port of Baltimore. Information developed as part of that study, he said, will be turned over to the partnership as BG&E's contribution to the venture. The other partners are to put up $250,000 each.

The feasibility study is expected to be completed in late 1984 or early 1985. It would take three to five years to build the pipeline.

In announcing the agreement yesterday, BG&E officials said the company feels obligated to participate in the pipeline venture in an effort to reduce costs for the company as well as consumers. The cost of hauling coal by rail continues to escalate and the pipeline would be "an attractive economic alternative," BG&E Chairman Bernard C. Trueschler said in a statement issued yesterday.

BG&E said it pays an average $14 a ton to transport coal by rail and could save an estimated $3 to $5 a ton if the pipeline is built.