President Carter's plan for a Department of Education cleared a major barrier yesterday as it won approval from the House Government Operations Committee on a 27-to-15 vote.

Chairman Jack Brooks (D-Tex.) broke into a big grin and raised his hand in a happy sign of victory as the committee completed the vote after a week of stalling and wrangling over amendments by opponents. Twenty-two Democrats and five Republicans voted for approval. Seven Democrats and eight Republicans opposed it.

Brooks said that despite the lateness of the session. "If the speaker and the president want it" and press for it, the bill could reach the House floor sometime after the upcoming recess, which ends Sept. 6.

Opponents said they will try to beat or amend the bill if it comes to the floor, and one lobbyist for a union vowed, "We'll cut it to pieces."

Brooks, backed by senior Republican Frank Horton (N.Y.) and a majority of the committee Democrats, drove the bill through the committee despite opposition from the AFL-CIO, Amercian Federation of Teachers and other labor and welfare groups who fear separating education from the Department of Health, Education and Welfare will fragment their lobbying influence and break links with welfare and related programs in HEW.

Conservatives like John N. Erlenborn (R.Ill.), who tried to delay a vote as long as possible, also opposed it on grounds it would lead to federal control of education at all levels.

But the National Education Association and other education groups as well as President Carter sought the creation of the new department, arguing it would give educational matters more focus and elevate the status of the programs by giving them a direct cabinet spokesman.

As approved by the committee, the new department would have about 16,000 employes and a budget of about $14.4 billion. It would include all the major education programs, currently in HEW, such as college aid, elementary and secondary school aid, education of the handicapped; a major civil rights enforcement office for education; the vocational rehabilitation program from HEW; and the Defense Department's overseas schools, which have 10,000 employes and 150,000 students.

The Senate version, approved several weeks ago by the legislative committee there and awaiting floor action, totals $18 billion in programs and 24,000 employes.