The Reagan administration's flabbiness in selling a tough, no-nonsense Persian Gulf plan to Congress has as its counterpoint the stunning success of the American Israel Public Affairs Committee (AIPAC) when it ran roughshod over the whole national security apparatus to kill the sale of Maverick missiles to Saudi Arabia.

Neither the failure of well-intentioned Reagan operatives, unified for once from Pentagon to Senate, nor the surefootedness of AIPAC was accidental. To the contrary, the betrayal of the Saudis implicit in the withdrawal of the Maverick sale was portended last month when White House Chief of Staff Howard Baker, ducking combat with Congress, blinked on the overall Persian Gulf plan -- and was overruled.

And last week it was Baker who dictated the retreat on the Mavericks, right in the presence of national security adviser Frank Carlucci. A strongly worded ''joint national security position'' sent to Venice from Washington advised President Reagan to stick to his guns on the Mavericks. Baker ignored it. Since the Mavericks are tightly linked to the Persian Gulf plan, that spelled costly defeat for Reagan in round one of his political battle to safeguard Western oil supplies.

AIPAC, which is not accustomed to defeat, did its countervailing work on the Maverick missile sale with the practiced skill and stealth that should have come from the administration, considering its six years' experience. The Mavericks were a juicy target. AIPAC uses most of its influence over American Mideast policy to enlist the power of the United States in the service of Israel, but that influence has been damaged. Israeli spy Jonathan Pollard and Israel's undercover role in the Iran arms sale weakened AIPAC.

The Mavericks made the terrain right for a comeback employing an AIPAC speciality: a midnight raid. With the president vulnerable in Venice, naked to the obloquy of a negative Senate Foreign Relations Committee vote, AIPAC knocked on doors and rounded up 14 votes for a bill barring the Mavericks, to only five in favor. ''They wanted the avalanche to hit while Reagan was in Venice,'' an administration aide told us.

AIPAC also claimed enough members in both houses to override a presidential veto. Senate Foreign Relations Committee Chairman Claiborne Pell, acknowledging to us AIPAC's quiet work ''with my colleagues'' (he was known to be pro-AIPAC) sent that word to the White House.

While AIPAC quietly recruited, Secretary of State George Shultz was tending the diplomatic circuits in Venice and the president was out of the loop. Mavericks for the Saudis were no competition for the heady summit atmosphere in Venice. Thus, the ''joint national security position'' sent to Venice last week, holding that a smart offensive could roll back AIPAC and save the vital Maverick portion of the Persian Gulf plan, went for naught.

But in fact there were ways for Baker to press Reagan in an effort to fight AIPAC: a direct, private Reagan appeal to Sen. Pell and the House Foreign Affairs Committee to await the president's return; a tough, public quote from the president in Venice that with the Saudis even then negotiating with Defense Secretary Caspar Weinberger on Persian Gulf help for the United States, killing the Maverick sale would be self-defeating.

Baker said no. The Pavlovian instinct of this man of Congress teaches that a step backward is preferable if a showdown can be delayed.

For AIPAC, persuading Baker to pull back the sale was a double whammy. Not only did it prove its dominance over the president but it also hit the Saudis with an insulting public rebuke. AIPAC allies told us the insult will worsen the rift between the United States and its oldest Arab ally. That relationship soured last month when AIPAC spread false word that a Saudi F-15 refused to attack the Iraqi plane that fired missiles at the U.S.S. Stark.

''Ironical,'' a key Pentagon policy maker told us about that charge. ''AIPAC was instrumental in putting hobbles all over those F-15s when we sold them, like small fuel tanks and operational limits, and now they blame the Saudis when the pilot did what he was supposed to.''

Reagan's Maverick sale is a key portion of the overall Persian Gulf plan to defend Western interests and protect safe passage for Kuwaiti tankers. As the president stated in his televised talk Monday night, the policy has many sides. ''It is a policy of totality,'' a key Reagan aide told us.

AIPAC's defeat of the Maverick sale last week split the package, at least for now. That will make it harder for Saudi Arabia to give the United States the Persian Gulf help demanded by the same congressmen who joined AIPAC's anti-Mavericks. If AIPAC ran a school on lobbying Congress, the president would do well to enroll some of his own aides.