The intensifying tug-of-war over the heart and mind of the Education Department surfaced yesterday in a Senate confirmation hearing that was gaveled to a close just as testimony opposing a controversial nominee to the department was about to begin.

Sen. Gordon J. Humphrey (R-N.H.), invoking a time rule on hearings while the Senate is in session, blocked testimony against Wendy Borcherdt, President Reagan's nominee for deputy undersecretary for intergovernmental affairs, who has been vehemently opposed by women's education groups.

Earlier, Sen. Claiborne Pell (D-R.I.) complained that Sen. Paula Hawkins (R-Fla.), who was filling in as chairman of the Senate Labor and Human Resources Committee hearing, had unilaterally altered committee procedures to prevent the testimony of additional witnesses against Borcherdt.

The Education Department has been an ideological battleground for more than a year as the administration, over cries of protest from some education groups, has filled one position after another with advocates of high-priority conservative items such as the growth of private schools and public school prayer. At the same time, the department has given lower priority to programs dealing with such issues as minority and women's rights.

Of particular concern to women's groups was the nomination of Borcherdt, a former White House women's liaison, to a position that would make her responsible for women's educational equity programs and the Office of Women's Concerns.

In her White House job, the National Coalition for Women and Girls in Education contended in the testimony it was not able to give yesterday, Borcherdt "viewed her role not as the liaison between women and the administration, but as the White House protector from women's organizations, the barrier between the two groups."

Borcherdt's critics also contend that she "subverted" an advisory council on women, engineering the appointments of council members opposed to the Women's Education Equity Act and the ouster of the executive director. Borcherdt yesterday denied having any part in the council's appointments or activities.

A dozen education and women's groups had asked to be permitted to testify at yesterday's hearing, but committee chairman Orrin G. Hatch (R-Utah) had approved only the coalition. Pell's attempts to get testimony from six more groups were thwarted by Hawkins, who first demanded the names of the witnesses as well as their organizations and then wanted telephone confirmation from the organizations.

"In the 22 years I've been here, we've never done that," Pell complained.

A committee aide said another hearing will have to be scheduled to take the coalition's testimony, and Pell still hopes to get approval for more witnesses.

Among other nominations before the committee was that of Manuel Justiz, Reagan's choice to replace ousted conservative Edward Curran as director of the National Institute of Education. Humphrey grilled Justiz on his thoughts about "the change in the tenor of philosophy" at NIE over the past year, and pointedly warned him not to attempt to eject his deputy director, Robert Sweet.

"Any attempts to oust him will be read by many of the president's supporters as a . . . sellout of the principles that have guided this administration," Humphrey told Justiz. "I put you on notice, respectfully, that that situation will be watched."

Sweet, a conservative New Hampshire Republican, recently tried to move research funding into studies of the "adverse effects of values education," by which he means "values based on the absence of God." Critics read that as a desire to inject religion into the public schools.