John F. Kennedy had a contentious relationship with Congress over the course of his presidency, to say the least. In terms of legislative action and reform, Kennedy was forced to find an often undesirable compromise due to this relationship. From the time that he outlined his agenda, known popularly as the "new frontier," Kennedy was the subject of skepticism from many democrats, particularly southerners, and for this reason was unable to take advantage of a democratic majority.
Kennedy encountered a great deal of resistance in Congress on the matter of his proposed social and economic reform. Frustratingly, Kennedy seemed to be on to something, as a major economic downturn had been resolved after only one year of his being in office. We will never know how much Kennedy might have benefited certain factors, such as improved medical care for the elderly and and a Department of Urban Affairs, as they were soundly shot down by Congress, the latter due to fear of an appointment of a black secretary.
Indeed, racial tensions were at the very center of Kennedy's strained relationship with Congress. It goes to show the depth of racism of the time, as Kennedy is often criticized to this day for how lukewarm his reform goals seemed. Kennedy even went as far as to delay presenting Civil Rights reform legislation until his second term as a political maneuver, a tactic that outraged black Americans. Nonetheless, even with his reform tactics as mild as they were, he was met with hostile resistance.
Kennedy was largely hampered in his dealings with Congress on account of his relative lack of experience. Having served only two terms in the House and one in the Senate, Kennedy lacked the requisite knowledge needed to navigate the numerous hazards and pitfalls involved in getting a presidential agenda through Congress.
Unlike his successor, Lyndon Johnson, he was unable to capitalize on a Democratic congressional majority to drive through progressive policies. The large block of conservative Southern Democrats in Congress provided much of the opposition to Kennedy's domestic agenda. As dyed-in-the-wool white supremacists, they were particularly hostile to any movement on the divisive issue of civil rights, where Kennedy sought to make modest progress. Southern Democrats also blocked much of the Kennedy Administration's social agenda, including a major medical program for the elderly. For good measure, they killed proposals to establish a Department of Urban Affairs, believing that Kennedy would appoint an African American as its first secretary.
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.
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.