Some of congressman William H. Gray's constituents came to town yesterday. As many as 2,000 of them, most on an Amtrak train from his Philadelphia district. When they arrived at the Capitol, they entered slowly, politely into the Rotunda. And entered. And entered. It took an hour.

They came dressed for the occasion, coats and matching hats, furs and pearls. Most had been to the Capitol before. They were back not just for the tour, and some didn't even take it; others preferred to find a comfortable bench in the Rotunda and simply admire the majestic view. They came to see Bill Gray. More specifically, they came to see the first black officially sworn in as chairman of the House Budget Committee. That may make Gray, a fourth-term Democrat, the most powerful black in the House.

During the afternoon, the Philadelphians moved from the Rotunda to the House Chamber. By early evening, they had gone to the Sheraton Grand Hotel to see House Speaker Thomas P. O'Neill Jr. hand the gavel of authority over to Gray. In a hotel reception room, all crowded before a podium where Gray, his family and his congressional colleagues stood. On the wall behind them was an array of red, white and blue balloons. The crowd squeezed together, snapping cameras, lifting tape recorders and hoisting children on shoulders.

What they saw was the congressional likes of Rep. Jack Kemp (R-N.Y.), House Majority Leader James Wright (D-Tex.), Senate Budget Committee chairman Pete Domenici (R-N.M.) and Sen. Slade Gorton (R-Wash.). Also there were Philadelphia Mayor Wilson Goode and D.C. Mayor Marion Barry.

"I've had a chance to talk to him," said Domenici about his House counterpart, "and let me tell you, I think things are in good hands. When this ends, the House will be proud of him, members of the Senate will be proud of him, the people of Philadelphia will be proud of him, and the people of this country will be proud of him."

The applause was thunderous.

Boomed Buffalo congressman Kemp, "This is a great day for Philadelphia. Not only that, this is a great day for the country."

"Amen!" yelled someone in the crowd.

Kemp continued, "We want Bill Gray to be a success as the first black chairman of the Budget Committee . . ."

"He will be!" a voice shouted from the crowd.

The subsequent roar of approval drowned out the rest of what Kemp had to say.

Praising Gray and Philadelphia's voters for their acumen in electing him to four terms, Goode said, "Now the entire nation will have a chance to know what you've known -- that Bill Gray is an outstanding leader . . . Today Philadelphia can stand here and poke out its chest and be proud."

O'Neill said, "Bill, you're on your own. We're all rooting for you. Here's the gavel of authority."

That was the moment they'd come to Washington to witness.

And with some words from Gray himself ("We are committed to making sure . . . that this is a society of growth and also a society that is fair to all of God's children"), Philadelphians made their way into the cold evening, hoping not to miss their train.

"Right up this way here, folks," Capitol guide Ted Daniel said endlessly, cheerfully, in the early afternoon.

Before getting into the Rotunda they waited on the Capitol steps. Inside the Rotunda they waited for a tour. And then they marched up more steps to the House Chamber to watch Gray address them. They filled the entire chamber: members' seats, the visitors' gallery, everywhere. Like a proud family that had come to see the son they always knew would succeed, they took pictures.

"I should tell you something," said Gray. "I see some flashes. You cannot take pictures in the House of Representatives." There were chuckles across the chamber. "Don't get me run out of here," he quipped. The flashes immediately stopped.

"Anyone witnessing this," said Eileen McCaskill, "is being privy to a very historic event."

Added Deborah Wells, "And we'll also be able to relate it to our children when they open their history books." There was no doubt that history was being made.

"I think it's an outstanding event in our history," said Janice Wescott, an evangelist minister from Philadelphia. Clutching her hand was her snow-suited 4-year-old, Mark. Behind him were her daughter Angel, 8, and her niece, Lisa Brown, 11. "I wanted them to see this historic event." She added: "I think he's going to be our first black president."

The tour was arranged by the Bright Hope Baptist Church in Philadelphia, which is where Bill Gray is a minister and where his father and grandfather were ministers. For $35, congregation members could ride the train to Washington and back, take a tour of the Capitol and go to the hotel reception.

Not all came because of church ties.

Daisy W. Reaves is principal of Simon Gratz High School. "Bill Gray was in the class of '59 while I was a teacher there," said Reaves. "I was thrilled a graduate of my school has reached the heights he has."

"It's a once in a lifetime experience," said Jean Seegers, referring to being able to watch Gray be sworn in. "We don't know if we'll ever have this experience again."

Merrie Felder worked in Gray's 1978 campaign. "We're here to show our support," said Felder. "I've been to the Capitol many times. I'm sure this won't be the last. I'm sure this is not going to be the last time we see someone like Bill Gray hold this position."

In the Rotunda, real estate broker Wendell Keene, a friend of Gray's, was snapping pictures. "I couldn't miss it," he said of the occasion.

Waiting in line for a tour, social worker Marianne Reeves slipped off high-heels to put on flats. "Bill Gray is a Philadelphian," she said. "We sent him here to represent us. I thought I'd like to show my support and how pleased I am."

Systems analyst Bill Fisher came to see his fraternity brother -- he and Gray belong to Alpha Phi Alpha. It was his first trip to the Capitol. "I never spent so much time in line since I got out of the Navy," he chuckled, waiting for a group to be escorted to the House gallery. He estimated he spent 45 minutes on the Capitol steps waiting to get in.

"All of Mr. Gray's group, this way," called a guide.

"They could say 'Congressman Gray,' " Fisher said softly.