It lasted only 23 seconds and the words were hardly the stuff of great oratory, but there was Steny H. Hoyer, freshman congressman from Maryland, denouncing President Reagan in prime time on all three television networks minutes after Reagan's State of Union address.

Hoyer, his brow furrowed with concern, his hands punctuating the message, attacked Reagan last January for an economic program with "one policy for the rich and another for everybody else."

It was the kind of exposure other Congressional newcomers might kill for -- even this bit part on the Democratic Party's national response to Reagan with Sen. Edward M. Kennedy and Speaker Thomas P. (Tip) O'Neill. To the savvy and ambitious Hoyer, the only freshman to win a role, it had come easily. Rep. Tony Coelho (D-Calif.), the party leader who put the show together, simply called Hoyer because "I like Steny and think he projects well."

What's more, as one Hill staffer would later assert, "If you had to go to Hollywood and cast a politician, you'd pick Steny. The way he dresses, the way he looks, the way he talks. The word among staff and some members is: He is a comer."

That word is a sign that the one-time golden boy of Prince George's politics, who rose to near the heights of Maryland government and then toppled in a dramatic upset loss in seeking the 1978 lieutenant governor nomination, is back on track. The 42-year-old Hoyer, who celebrated his first anniversary in Congress last Thursday, is displaying the same traits on Capitol Hill that made him a powerful insider in Annapolis -- boundless energy, devotion to the party system and the knack to identify the pockets of power and quickly climb inside.

Still, if it were not for a twist of fate, Hoyer might still be in District Heights practicing law, the profession he returned to during his forced political exile.

Hoyer got to Congress after Rep. Gladys Spellman, who looked unbeatable in seeking a fourth term, suffered heart arrest during a 1980 campaign stop. (She remains in a semicomatose state in a nursing home.) The House declared her 5th District seat vacant in February 1981.

"If Mrs. Spellman were still in Congress, it is difficult to say what I'd be doing ," Hoyer mused after announcing for reelection. "I'd be one of her strongest supporters . . . But I have a feeling I'd be active somewhere, doing something in politics."

Hoyer jumped into the fray within days of the House action, won a hotly contested primary against Spellman's husband and then romped to victory in a special election that ballooned into a national test of the Reagan administration's popularity.

"Steny understood it was more than just a local race. He understood the national picture," said Coelho, chairman of the Democratic Congressional Campaign Committee. With victory came congratulatory calls from former Vice President Walter Mondale, bearhugs from Speaker O'Neill and a hero's welcome from elated Democrats when Hoyer traveled to the Hill hours after his electoral triumph. "He wasn't just another member elected," said Coelho. "He was a member elected in the spotlight."

And Hoyer was not about to stray from its warm glow.

When Coelho asked him to establish and head the "Majority Party," a group designed to get Capitol Hill staffers and other Democrats involved in fundraising and campaigning, Hoyer quickly agreed. The acceptance won Coelho's friendship and "great exposure" for Hoyer, according to a Democratic leadership aide. "His name is on every letter the Majority Party sends out to every office. What other freshman can claim a forum like that?"

Hoyer, the consummate politician who was once the youngest state Senate president in Maryland history, also dared to venture where other newcomers might fear to go. Last November, as House and Senate leaders engaged in marathon weekend negotiations on a funding bill to prevent a government shutdown, Hoyer, who'd been in office less than six months, sat in the conferees' room off the Hall of the Vice Presidents in the Capitol, taking in their every move.

"A number of others dropped in, but none stayed with it," said Hoyer, who recalled that during one break he had a talk about the budget process with Sen. Paul Laxalt (R-Nev.), the President's closest friend in Congress. "That kind of thing is helpful."

But the key to Hoyer's automatic fit into the mold of congressman is his understanding of the way a legislature, state or national, works. "Steny knows that if you want to do anything around here, you need 217 supporters," a key leadership aide said, explaining the simple political reality in a body with 435 votes.

Hoyer has used that knowledge to successfully play the age-old game of political give and take. Last year, he joined with Republican Rep. Frank Wolf of Virginia to persuade reluctant colleagues to approve a pay raise for top-ranked federal executives, 1,200 of whom live in his northern Prince George's County district. Earlier, he had lobbied for and voted for a controversial federal tobacco support program important to North Carolina colleagues and the Democratic leadership, which felt it owed the Carolina delegation a favor for voting heavily against the Reagan budget.

Although the tobacco vote might not have been popular at home, Hoyer said his action was in keeping with his whole philosophy of politics. "If someone needs something important to his people, it may not be my thing, but if it's a good thing, I'll help. In a collegial body, it is the way things work."

While the Hoyer philosophy, which includes a strong belief in party unity, wins praise in many quarters, it is not without its critics. "He is a no-nonsense opportunist," said one Hill staffer, who has watched dozens of ambitious congressman come and go. "All of his instincts are whichever way the leadership goes, he goes. Don't question it, just follow it."

And back in Prince George's, some politicians also grumble about Hoyer's continued hand in the internal affairs of the county, where he was one of the architects of a powerful party organization that flourished in the '70s. "But he's been a pretty good boy lately, trying to keep his fingers out," said State Del. Timothy Maloney, a frequent critic. "I guess," Maloney added only half kidding, "he's decided he'd rather be speaker of the House than a county powerbroker."

There is more serious speculation that Hoyer may be hankering after the U.S. Senate, particularly if Republican Sen. Charles McC. Mathias decides to retire in 1986. To that suggestion, Hoyer simply replied, "I'm just announcing for reelection to the Congress of the United States and am going to work very hard toward that objective."

With less than a month left to file for the Sept. 14 primary, Hoyer has no serious Democratic challengers. The GOP nominee is likely to be the Rev. Perry A. Smith III, a Baptist minister who switched to the Republican party in January. Smith denounced Hoyer for a "do-nothing tenure," saying the first he heard of Hoyer doing anything was his recent push for a federal worker pay raise. "Quite frankly," said Smith, "nobody heard from Steny until last month, after I announced. People need more adequate representation."

That is the harshest criticism any Republican can muster about the man from northern Prince George's County. "It's kind of awkward in an election year to say anything about Steny," said one GOP officeholder. "I don't want to heap praise on a Democrat at the expense of his Republican opponent."

That kind of compliment is almost standard from politicians who recognize Hoyer as a professional who is once again going places.

Virginia Democrat Ira Lechner, who's running for Congress himself, admiringly watched Hoyer's performance last month giving a Fairfax County dinner speech in which he spent more than 12 minutes praising every politician in the room and some who didn't even show up.

"He touched all the political bases that needed to be touched," said Lechner. "He demonstrated he knows how to stroke . . . . It's the difference between just another politician and something special."