The eyes of Texas and Tom Landry were upon them. The rain, as always, kept falling on this sod-forsaken field.

Using the elements like an expert alchemist, the San Francisco 49ers struck gold and advanced to within a victory of the Silverdome and the Super Bowl.

The 49ers defeated the New York Giants, 38-24, in today's NFC semifinal game before 58,360 at Candlestick Park. San Francisco, which hadn't appeared in the playoffs since 1972 and which never has played in the Super Bowl, will meet Dallas for the NFC championship at 5 p.m. next Sunday in this house of wind and slosh.

"Playing on this field," New York quarterback Scott Brunner said afterward, "is like giving San Francisco a 12th man."

The 49ers did not use a 12th man in gaining their 14th victory of a most explosive and improbable season.

What the NFC West Division champions did use was an offense that gained 423 yards against a New York defense that hardly played like giants, or even the NFC's No. 2-ranked defense. The Giants gave up their most points this season.

"We had to let them know we wouldn't use our normal game plan," said San Francisco quarterback Joe Montana, who completed 20 of 31 passes for a career-high 304 yards. Montana, piloting the offense of the '80s in the weather of the '60s, was 15 of 22 for 276 yards and two touchdowns in the first half alone.

Yet, this was not an easy victory. The score was 24-17 and the Giants were driving to what could be the tying touchdown late in the third quarter. Then Earnest Gray had a third-down pass batted away and Joe Danelo missed on a 21-yard field goal kick. That stopped the Giants and the 49ers scored again with 10 1/2 minutes remaining.

"This was a very typical playoff game," said Coach Bill Walsh. "Our offense today was as good as we've had since I've been at San Francisco . . . The home field is a distinct advantage for us."

It has been all year. San Francisco now has won eight of nine games played here, including a 45-14 rout of Dallas on Oct. 11.

The Giants, the 9-7 team of the NFC East, had reached the playoffs for the first time since 1964. But this game was not at all like the wild-card victory over Philadelphia.

Said linebacker Byron Hunt, "We knew what to expect, but we could not stop it."

The 49ers' first drive seemed stalled at their 36. But New York's Mark Haynes was called for holding before Jim Miller could get off a punt. The result was a 49er first down and, seven plays and six Montana passes later, a touchdown.

Montana hit tight end Charle Young with an eight-yard touchdown pass, Young's 300th NFL reception, with nine minutes left in the first quarter.

Six minutes later, however, Brunner threw Gray a perfect pass, splitting the hands of 49er safety Carlton Williamson at the New York 42. Gray outran a pack of 49ers for a 72-yard touchdown. It was 7-7.

But Montana charged up another sellout crowd on another day of rain in the Bay Area. He passed to Freddie Solomon for a 58-yard touchdown after Ray Wersching had kicked a 22-yard field goal. Both scores came early in the second period. Ricky Patton ran 25 yards for a touchdown minutes later. It was 24-10 at the half, following Danelo's 48-yard field goal with five minutes left.

Then, faster than you can say "offseason," the Giants plugged in an offense in the third quarter. Safety Bill Currier intercepted a Montana pass on the New York 41, with slightly more than 11 minutes left in the period. "It was a mistake," said Montana, who once threw 122 passes without an interception this year.

On the next play, Brunner would not make a mistake. He threw a 59-yard scoring pass to Johnny Perkins. It was 24-17 and, suddenly, it also was very much like the game played here Nov. 29: San Francisco 17, New York 10.

But the 49ers held their lead. It was, however, in jeopardy with slightly more than four minutes left in the third quarter. But on third and three from the San Francisco four, Brunner's pass to Gray in the end zone was knocked away by Eric Wright.

So Danelo, who has had problems kicking field goals recently, lined up for a 21-yarder. He missed, banking a line drive off the left goal post.

Four minutes into the fourth quarter, Bill Ring, a San Francisco special teams player, ran three very special yards for a touchdown. It was 31-17.

Two touchdowns, the first on a 20-yard interception return by San Francisco's Ronnie Lott, on his second pickoff of the game, the second on Brunner's 17-yard pass to Perkins, followed late in the game. They did not diminish the importance of Danelo's momentum-deadening miss.

"My leg is okay," he said. "I need to check to see where I'm making mistakes."

The 49ers do not have such trifling worries. Their defense, which had an NFL-best turnover ratio of plus-23, caused four today, two interceptions and two fumbles. Unlike Philadelphia, their defense also held Rob Carpenter to 61 yards on 17 carries.

Ray Perkins, the New York coach, was not pleased with the game and thinks the 49ers will feel the same way after next week's showdown with Dallas. He said, "Dallas will win . . . Dallas has been in this situation before."

Later, Walsh smiled and tugged on his 49er sweater that, because of the rain and temperatures in the high 40s, no longer looked country club chic. "Things will have to remain this way for our offense to beat Dallas," he said. "We've been loose all year and that's how we handled the pressure."