A Montgomery County grand jury is investigating whether top county police officers, including Chief Bernard D. Crooke, allowed high-stakes gambling to occur at the Progress Club in Rockville in exchange for large contributions by club members to two police-related charities, government sources said yesterday.

Sources said the investigation has focused in part on a county police officer's solicitation of a contribution from the Progress Club to the county Boys Club in Rockville. The officer requested the contribution over the telephone at Crooke's direction, sources said.

Crooke, who has built a reputation for honesty in his 27 years as a police officer, yesterday denied any wrongdoing. "In no way shape or form have I or this department benefited" from the donations, Crooke said in an interview. "I've got a clear conscience."

The grand jury earlier this month subpoenaed and received all county police files relating to the Progress Club, which was raided by Rockville City police on June 6. Twenty-one persons, many of them elderly, affluent businessmen, were arrested on illegal gaming charges and $27,700 was seized in the nighttime raid.

In the days after the raid, several law enforcement officials, including State's Attorney Andrew Sonner, speculated that the club's donations to police charities may have been a factor in the county police's failure to break up the gambling operation.

According to confidential court records and sources, six ranking officers in the county police department, including Crooke's deputy, Lt. Col. Donald E. Brooks, and Lt. James Taylor, head of the department's vice and intelligence unit, have testified before the grand jury. Two other lieutenants and two sergeants also testified.

Crooke has not been called to appear but indicated he would do so if asked.

His boss, county executive Charles W. Gilchrist, said yesterday that "the police department . . . is giving every possible cooperation to the state's attorney and the grand jury. I have every confidence in the competence and honesty of the police department."

Sonner yesterday declined comment on evidence his office has presented to the grand jury so far.

However, sources familiar with the case said it probably will turn on two donations totalling about $6,000 that the Progress Club made to the two charitable organizations.

Sources said Crooke was briefed about gambling at the Progress Club when he became chief in May 1979. Crooke yesterday confirmed that briefing, and said that since then his officers have tried without success to build a case against the club.

In either 1982 or 1983, according to police officials, Crooke forwarded a $1,000 check from the club to Heroes Inc. a Washington-based organization that aids the surviving relatives of law enforcement officers and firefighters killed in the line of duty.

Crooke also helped arrange the contribution to the local Boys Club, which was trying to raise $50,000 to repair its roof.

Crooke, who was a cochairman of the Boys Club fundraising drive and a member of its board, asked one officer to contact the Progress Club about donating to the drive, sources said.

The club agreed, eventually donating between $4,000 and $5,000 to the Boys Club.

Yesterday, Crooke insisted that in neither case was there any wrongdoing.

"If I'm the funnel to a legitmate organization . . . I don't care who a contribution is from," Crooke said. "If a check came in here today from the Progress Club, I'd forward it to Heroes Inc."