Pamela Gray traces the roots of her young screenwriting career to a search for a dining-room table several years ago when she was living in Oakland, Calif. She was scanning the furniture classifieds when she spotted a one-line ad for a sitcom writing class.

“I had an epiphany that I would make a living writing for television,” says Gray, 43, now living in Los Angeles. With a master’s degree in poetry from Boston U., Gray spent a few years teaching poetry and writing it on the side, then shifted from verse to spec scripts.

Nothing sold, but positive feedback kept her going. A play she co-wrote while in the San Francisco Bay Area had a suc-cessful run and made her think ambitiously about a screenwriting career.

She made the big move to L.A. after enrolling in UCLA’s graduate screenwriting program. It paid off when she earned an internship opportunity at syndicated series “Star Trek: The Next Generation.” The show’s producer gave her a shot at rewriting an episode, which he bought. Her first script aired later that year while she was finishing up her master’s degree.

However, what really propelled her career was winning a prestigious Samuel Goldwyn writing award in 1992 for her script “The Blouse Man.” Based partly on her experience growing up in New York and vacationing during the summer in the Catskills, where vendors were known simply by their wares, it’s the story of the poignant affair that blossoms between a man selling blouses and a vacationing restless married woman. Retitled “A Walk on the Moon,” the film played to very favorable reviews earlier this year.

After “Moon,” she signed on with Miramax to write a fictional account based on the inspirational story of New York violin teacher Roberta Guaspari-Tzavaras. Wes Craven directs Meryl Streep in the project, “Music of the Heart,” based on the docu “Small Wonders.” The pic is due Oct. 15.

In keeping with her penchant for strong characters, Gray recently wrote an adaptation of a young woman’s Holocaust memoir for Universal. The studio hopes to sign director Agnieszka Holland (“Europa Europa”) to the project.

Gray also will write an episode for the new ABC drama “Once and Again.”

Success has given Gray the liberty to limit her assignments to works that spark her interest. “I need to feel a passionate con-nection to the main character and the story,” she says. “I always go back to the characters and whether they are people I want to inhabit and spend time experiencing.”