A jobs bill based on a nickle-a-gallon gas tax has split the ranks of organized labor even as it inspired rare bipartisan harmony in Congress last week.

The AFL-CIO is philosophically opposed to the notion. Its leadership "does not want to get involved in endorsing a regressive sales tax as a way to finance much-needed jobs legislation," said a spokesman for the labor federation. "We believe in taxes based on ability to pay."

This attitude upset some of the federation's building trades members who are, as one official put it, "hot to trot" on the legislation.

The $5.5 billion plan would finance repairs on the nation's highways, bridges and other transit facilities with the increase in the gas tax from 4 to 9 cents per gallon. Officials estimate that it would create 320,000 jobs.

On its face, the bill's prime beneficiaries would seem to be those who know how to build roads, bridges and the like, and many of them belong to the building trades unions. However, the bulk of the jobs apparently would go not to construction workers on the site but to others.

The type of jobs created by the bill break down roughly as follows, according to federation economists and based on a government formula: 38 percent on the project site, 55 percent off-site in manufacturing materials, transportation and services and 7 percent to engineers on and off the site.

The labor squabble is not expected to affect the bill's progress. "The AFL-CIO certainly isn't going to actively oppose the thing. That makes no sense," one labor official said. "But the building trades are so anxious to have the legislation, they were scared to death when the federation held back its lobbying machinery ."

The bill has the backing of President Reagan and leaders of both parties in the House and Senate in the wake of a post-election sense that Americans are impatient for government action on unemployment.

J.C. Turner of the Operating Engineers, a major building trades union whose members drive bulldozers and other heavy equipment, said through a spokesman that he is "supporting it all the way" not only because of the jobs on and off the project sites but also because it serves a need "essential to the health and safety of the nation."

Even if it has no immediate practical effect the fact that organized labor cannot unite behind a job-creating bill underscores the difficulty faced by AFL-CIO President Lane Kirkland in his effort to unify the labor movement behind a Democratic "consensus" candidate in 1984.