The 28-year-old "Brokeback Mountain" star died of an accidental prescription drug overdose in his Manhattan apartment last month.
An emotional Williams, wearing dark glasses and a white dress with black trim, was not accompanied by Matilda, her 2-year-old daughter with Ledger. Williams was ushered in clutching the arm of Ledger's older sister, Kate.
Australian actress Cate Blanchett, who starred with Ledger in the Bob Dylan bio-flick, "I'm Not There," a role that earned her an Oscar nomination for best supporting actress, was among the celebrities present.
Blanchett spoke of the times she shared with Ledger in New York and Los Angeles, Barbara Stott, a state lawmaker, told reporters after the 75-minute service.
Other speakers included his parents, sister and Neil Armfield, who directed Ledger in his last Australian film, "Candy," released in 2006.
A video tribute compiled by family and friends included footage from Ledger's films and of his daughter, over whom he doted.
The music reflected his eclectic tastes: Dylan's "The Times They Are A-Changin," the Beatles' "Here Comes the Sun," "Wish You Were Here" by Pink Floyd and Neil Young's "Old Man."
"It was a wonderful tribute to a wonderful West Australian; an outstanding guy with great talent," Stott said.
Ledger's father Kim said the service would be followed by a private funeral in Perth. He appealed for privacy and did not disclose the time or location.
"The funeral will be very, very private and there will only be 10 people there, immediate family and nobody else," Kim Ledger told reporters earlier in the day.
"It's a pretty sad time. We're finding it difficult to cope by ourselves, let alone cope with everybody around the world," he said.
"Having said that, we do really appreciate the outpouring and the emotional support from all over the globe," he added.
Among the first to arrive at Penrhos College was Australian model Gemma Ward, a former girlfriend of the star. Wearing dark glasses with a black top and skirt, Ward filed with other mourners through a screened side gate where two women dressed in black checked their identification.
Local musician Levi Islam told reporters outside that he opened the service in a theater by playing an ancient Aboriginal dirge with a didgeridoo, a traditional wind instrument.
Ledger's death on Jan. 22 drew outpourings of grief from New York to Hollywood to Perth, a small and remote city on the verge of the Outback in Australia's southwest.
The New York City medical examiner announced Wednesday that Ledger died from the effects of taking six types of painkillers and sedatives.
Family members returned home from the United States this week to lay Ledger to rest following a memorial service in Los Angeles last weekend.
Mourners gathered after the service for a wake at a colonial-style waterfront restaurant at Cottesloe Beach, a resort on Perth's coast that was a favorite spot of the actor's.
Williams, 27, and Ledger became a couple during filming of "Brokeback Mountain," in which the two costarred as husband and wife. Ledger was nominated for an Oscar for his performance in the film.
They later moved to New York, where Matilda was born in October 2005.