Jackie Gleason, the roly-poly comedian, actor and musician who was one of the leading entertainment stars of the 1950's and 60's, died last night of cancer at his home in Fort Lauderdale, Fla. He was 71 years old.

Mr. Gleason was released last Thursday from the Imperial Point Medical Center in Fort Lauderdale, where he had been undergoing treatment for cancer.

His wife, Marilyn Gleason, said in announcing his death last night that he ''quietly, comfortably passed away.''

Mr. Gleason's television comedy series from the 50's, ''The Honeymooners,'' became a classic of the medium and was seen by millions year after year in reruns. His variety-comedy program, ''The Jackie Gleason Show,'' had an extraordinarily high average Nielsen audience-popularity rating of 42.4 for the 1954-55 season, which meant that 42.4 percent of the nation's households with television sets were tuned in. 'Plain Vanilla Music'

He also had parts in 15 films, ranging from a deaf-mute janitor in ''Gigot'' to a pool shark in ''The Hustler,'' for which he was nominated for an Academy Award. And his occasional theater roles spanned four decades, beginning on Broadway in 1938 with ''Hellzapoppin' '' and including the 1959 Broadway musical ''Take Me Along,'' which won him a Tony award for his portrayal of the hard-drinking Uncle Sid.

When he was not performing, Mr. Gleason was often conducting or composing mellow romantic music, ''plain vanilla music'' he called it, which was marketed in record albums with such unpretentious titles as ''Lazy Lively Love'' and ''Oooo!'' He recorded more than 35 albums with the Jackie Gleason Orchestra, and millions of the records were sold.

''Life ain't bad, pal,'' Mr. Gleason once told an interviewer. ''Everything I've wanted to do I've had a chance to do.''

Among the things he wanted to do was to enjoy himself, and he did that mightily: His huge appetite for food -he could eat five lobsters at a sitting -sometimes pushed his weight up toward 300 pounds. His thirst for glamour led him to have CBS build him a circular mansion in Peekskill, N.Y., costing hundreds of thousands of dollars.

And his craving for affection and attention made him a huge tipper, an impulsive gift-giver - he gave a $36,000 Rolls-Royce to charity - and a showman morning, noon and night. In 1962, he chartered a train, put a jazz band on board and barnstormed across the country, playing exhibition pool in Kansas City, Mo., mugging with monkeys at the St. Louis zoo and pitching in a Pittsburgh baseball game. Born in Brooklyn

His huge success took him far from the humble circumstances of his childhood. His real name was Herbert John Gleason, and he was born Feb. 26, 1916, in Brooklyn, the son of Herbert Gleason, a poorly paid insurance clerk, and Mae Kelly Gleason.

When he was 3, his elder brother died; his father disappeared five years later. To keep the wolf from the door, his mother then went to work as a subway change-booth attendant, a job she held until she died in 1932.

Mr. Gleason went to Public School 73 and briefly to John Adams High School and Bushwick High School. He grew up to be a broad-shouldered six-footer with flashing blue eyes, curly hair and a dimple in his left cheek.

Early in life Mr. Gleason found that humor brightened his surroundings. He became a poolroom jokester and a sidewalk observer of passers-by and their comic traits, which he later drew on for comedy routines. He began putting his comic skills to work in school plays and at church gatherings. Won Amateur-Night Prize

Then he won an amateur-night prize at the old Halsey Theater in Brooklyn and was signed up to be a master of ceremonies at another local theater, the story goes, for $3 a night. He went on to work as a barker and master of ceremonies in carnivals and resorts in Pennsylvania and New Jersey.

Manhattan cabaret work followed, then small comedy and melodrama parts in Hollywood in the early 40's. In the film capital, the tale has it, someone told Mr. Gleason, already hugely overweight, to slim down. By heroic dieting, he brought his weight down 100 pounds, only to be told by one producer, ''You look great, but skinny you're not funny.''

For many years, Mr. Gleason was more or less spectacularly obese, and he used to say cheerfully that as a comedian he could ''get away with more as a fat man.''

Hollywood had its disadvantages, Mr. Gleason liked to recall in later years. The pay on his Warner Brothers contract was disappointing, and he was put into gangster roles, or, as he put it, ''I only made $200 a week and I had to buy my own bullets.'' Disguised in a Wave's Uniform

Returning to New York, he began proving his versatility as a performer. He got good reviews for his part in the 1944 Broadway musical ''Follow the Girls,'' which included a scene where his 250 pounds were disguised in a Wave's uniform. He also went through valuable seasoning as a stand-up comedian.

Soon he was edging into the big time, appearing on the Sunday night Old Gold radio show on NBC and at Billy Rose's Diamond Horseshoe, a sumptuous nightclub of the day.