The Maryland House of Delegates reversed itself today and narrowly voted approval of a controversial measure intended to regulate gambling activities by nonprofit groups in the state.

The bill, substantially weakened by the same House Judiciary Committee that originally sponsored the measure, was approved with only 71 votes, the minimum needed, the day after the House initially failed to approve it.

Sixty-two delegates voted against and eight did not vote.

Three of the five delegates who changed their votes were from the Eastern Shore delegation. Several unhappy opponents of the gambling bill said the switch came because some members of the Judiciary Committee promised to approve a bill that would legalize the use of slot machines by nonprofit Shore groups that want to raise money for charity.

State police have seized scores of illegal slot machines in recent raids.

"It's true," shrugged Del. R. Clayton Mitchell Jr., newly persuaded of the gambling bill's merits along with Dels. Ronald A. Guns and John M. Ashley Jr., all Eastern Shore Democrats. Later Mitchell added, "I changed for good government reasons."

Also changing his vote was Del. Paul Weisengoff (D-Baltimore), considered a friend of the fraternal groups that vigorously fought the gambling bill.

Only nonprofit, religious or fraternal groups are allowed to hold gambling activities in most jurisidictions in Maryland.

Weisengoff noted that the bill had been substantially weakened from a highly restrictive measure to one that would require groups to file annual reports on the use of gambling revenues.

Weisengoff said he changed his stand because Del. Jerry Hyatt (D-Montgomery), a member of the Judiciary Committee, "went over the bill with me . . . . Obviously I was mistaken when I voted the other time because I didn't realize it was just a reporting bill."

The fifth vote that capped the victory belonged to Del. Anthony M. DiPietro Jr.(D-Baltimore).

Five votes were needed to overcome the Monday vote of 67 to 61 because the bill's prime sponsor, Judiciary Committee Chairman Joseph Owens (D-Montgomery), habitually refuses to vote for reconsiderations of bills, even for one of his own.

The victory for the bill's proponents may be temporary. The Senate is considered likely to kill the measure, partly in retribution for the Judiciary Committee's refusal to approve several measures favored by the Senate.

The gambling bill has been the subject of a vigorous and prolonged lobbying campaign by fraternal and civic groups that oppose restrictions on their ability to stage gambling events to raise funds.

Proponents of the measure said the public deserves to know how much the nonprofit groups contribute to charity and what the money is used for.