In general, President Kennedy did not have a great relationship with Congress.
JFK had been elected by the thinnest of margins and so did not really have any sort of a mandate from the people. This made it easy for Congress to resist him. In addition, he was a relatively liberal Democrat from the Northeast while Congress was controlled by conservative Democrats from the South. They blocked him on a number of issues such as federal aid to education and a precursor of Medicare. They even rejected a tax cut that he proposed in 1963.
While it is not accurate to say that he never got anything passed, JFK clearly did not have a very good relationship with Congress.
Politics is a tough business, and any time a president has to work with an opposing party in Congress the going will be difficult. Kennedy was a Democrat following 8 years of the Republican presidency of Dwight Eisenhower. When he was elected in 1960, America was on the cusp of a liberal period that would be highlighted by campus activism and inner-city strife, but it wasn't quite there yet.
So Kennedy's attempts to pass liberal legislation (which was part of what he referred to as the "New Frontier") were only partially successful, as noted in the responses above. However, after his assassination in 1963, some of his initiatives were expanded and driven through Congress by his successor, Lyndon Johnson. Johnson called his programs the "Great Society."
While it's true that Johnson's programs went further than what Kennedy proposed, we must keep in mind that Johnson faced an electorate and national mood that was changing quickly. Opposition to the Vietnam War and the push for civil rights action had liberalized enough of the population to force Congress to take unprecedented action. Some of these actions should be at least partially attributed to Kennedy, who bridged the gap between Eisenhower conservatism and Johnson liberalism.
President John F Kennedy had a poor relationship with Congress and because of his very narrow victory over Richard Nixon in the presidential election, he was totally dependent on Congress for enacting policies. In his own words, "A good many programs I care about may go down the drain as a result of this [his relationship with congress] - we may all go down." It also did not help that he was a liberal northern democrat, while the party majority was with southern democrats. And he needed their support not only for carrying out his duties as the [resident, but also for re-election. On a number of occasions, he had to resort to political maneuvers to get things done in the South. An example is the use of the justice system (through his brother Robert Kennedy who was the Attorney Journal) to enforce already passed civil rights legislation. James Meredith was not allowed admission to the University of Mississippi because of his color and the Supreme Court ruling was used to ensure his enrollment. In some cases he had to use federal funding as leverage to ensure the integration of African-Americans.
In general it was a poor relationship, however, he did get some work done (for example, the Housing Act, though it was very weak and only applicable to future projects).