CHICAGO, Oct. 4— It was 25 years ago that a 28-year-old black woman from this city changed American theater forever with her first produced play. The woman was Lorraine Hansberry, and the play, of course, was ''A Raisin in the Sun.''

Taking her title from Langston Hughes's poem ''Harlem,'' Miss Hansberry forced both blacks and whites to re-examine the deferred dreams of black America. She asked blacks to reconsider how those dreams might be defined; she demanded that whites not impede the fulfillment of those dreams for one more second. And she posed all her concerns in a work that portrayed a black family with a greater realism and complexity than had ever been previously seen on an American stage. A writer of unlimited compassion, Miss Hansberry believed that all people must be measured, as she put it, by both their ''hills and valleys.''

To celebrate the anniversary of this seminal play - which sparked the growth of the black theater movement in the 1960's - the Goodman Theater opened its season here Monday night with a full-scale revival, directed by Thomas Bullard. (Lloyd Richards, the original Broadway director of ''Raisin,'' will produce another major revival next month at the Yale Repertory Theater.) It is poignant to see the play again in Chicago, which, besides being the author's hometown and the drama's setting, has also recently elected its first black Mayor.

The Goodman's production, unfortunately, falls short, but it usually doesn't obscure the play's strengths. Miss Hansberry, who died of cancer at the age of 34 in 1965, wrote ''Raisin'' well before the marches on Washington, the assassination of the Rev. Dr. Martin Luther King Jr. and the inner-city explosions. Yet, with remarkable prescience, she saw history whole: Her play encompasses everything from the rise of black nationalism in the United States and Africa to the advent of black militancy to the specific dimensions of the black woman's liberation movement. And she always saw the present and future in the light of the past - clear back to the slavery of the Old South and the new slavery that followed for black workers who migrated to the industrial ghettos of the North.

Miss Hansberry works within the confines of what might be called a kitchen-sink drama, set in a cramped, tri-generational household on the South Side in the 1950's. At the plot level, ''Raisin'' is about how the Younger family will spend a $10,000 insurance payment it has received after its patriarch's death - and about whether the family will move into a now affordable new home in a hostile, lily-white neighborhood. But Miss Hansberry's real drama is the battle for the soul and identity of Walter Lee Younger, the family's son. Walter, 35, is a chauffeur who wants to get rich by opening a liquor store. Without quite realizing it, he oppresses his wife, Ruth, a domestic, and mocks the ambitions of his 20- year-old sister, Beneatha, a fledgling activist and medical student. ''I got me a dream,'' says Walter early in the play - but his dream is not to be confused with Dr. King's. What he wants is ''things,'' and, as he tells his horrified mother, Lena, he no longer regards money merely as a passport to freedom but as the essence of life.

In this sense, Walter is not just a black victim of white racism but also a victim of a materialistic American dream that can enslave men or women of any race. Seeing ''Raisin'' again, one is struck by how much Miss Hansberry's protagonist resembles those of other Chicago writers, from Dreiser's Sister Carrie to David Mamet's proletarian schemer Teach in ''American Buffalo.'' What makes ''Raisin'' so moving is that Walter finally does rise above his misplaced values to find a new dignity and moral courage - and that he does so with the support of his contentious but always loving family.

Miss Hansberry said that it was ''Juno and the Paycock'' that first sparked her passion for theater, and the best of ''Raisin'' shares O'Casey's muscular poetry, robust humor and faith in human perseverance. If there's anything dated about the work now, it is only its dependence on plot mechanics and, notably in Act II, its somewhat jerrybuilt structure.

The Goodman staging seems to remember too keenly the original Broadway production, most of which was preserved in the film version. Though arrestingly designed by Karen Schulz and lighted by Dennis Parichy, it contains performances that look like dogged, at-times strangulated imitations of those by Sidney Poitier, Diana Sands and Ruby Dee. The pacing is sluggish - the running time is three hours - and it would be hard to say that Brent Jennings digs much beneath the surface of the volcanic contradictions of Walter. To the extent that Mr. Jennnings flattens out this pivotal role, ''Raisin'' becomes a simplified melodrama.

Yet some strong fresh thinking is provided by Melva Williams, as Walter's mother. In some ways this lovable matriarch is almost too good to be true, but Miss Williams's flinty, intelligent underplaying keeps sentimentality at bay to give us a woman of commanding strength and pride. In her triumphant final moment - in which she takes a last look at her tenement home before leaving it forever - we can almost feel Lorraine Hansberry herself looking ahead to the future that she helped make but, tragically, never knew.

American Dream A RAISIN IN THE SUN, by Lorraine Hansberry; directed by Thomas Bullard; sets by Karen Schulz; costumes by Judy Dearing; lighting by Dennis Parichy; sound by Michael Schweppe; production stage manager, Joseph Drummond; stage manager, Melinda Degucz; artistic director, Gregory Mosher; managing director, Roche Schulfer. A Chicago Theater Group, Inc. Production presented by Goodman Theater of the Art Institute of Chicago. Ruth YoungerJackie Taylor Travis YoungerAntoine Roshell Walter Lee YoungerBrent Jennings Beneatha YoungerNancy Giles Lena YoungerMelva Williams Joseph AsagaiBasil A.Wallace George MurchisonDavid-Winston Barge Karl LindnerChuck Bailey BoboErnest Perry Jr. Moving MenRobert L.Curry and Allen Edge

photo of Melva Williams