Gurlitt, 81, hoarded hundreds of masterpieces in his Munich flat for decades, including works plundered by the Nazis from the Jews.
He never married and died childless.
But he bequeathed the collection, which he inherited from his father, who worked as an art dealer for the Nazis, to the Kunstmuseum Bern, the museum confirmed on Wednesday.
The Kunstmuseum said it was informed by Gurliitt's lawyer, Christoph Edel, by telephone and in writing of the "unrestricted and unfettered" bequest.
"The news came like a bolt from the blue," the museum said in a statement.
"Despite speculation in the media that Mr. Gurlitt had bequeathed his collection to an art institution outside Germany . . . at no time has Mr. Gurlitt had any connection with Kuntsmuseum Bern."
The museum said its board of trustees and directors are surprised and delighted by the legacy.
But they "do not wish to conceal the fact that this magnificent bequest brings with it a considerable burden of responsibility."
The museum acknowledged that the collection "raises a wealth of questions of the most difficult and sensitive kind, and questions in particular of a legal and ethical nature."
In a deal reached a month before Gurlitt's death, the hundreds of masterpieces, including works by Monet, Manet and Picasso, which had been confiscated by authorities, were given back to Gurlitt.
In return, he allowed art experts to examine his collection and agreed to hand over any works to their rightful owners.
Germany's Süddeutsche Zeitung reported on Wednesday that Gurlitt stated in his will that his 1,280 works, believed to be worth hundreds of millions of francs, should stay together.
According to the newspaper, Gurlitt, who died following a heart operation, made his will while in hospital a few months ago, bequeathing the works to the Swiss museum.
Kunstmuseum Bern said it would be unable to make a more detailed statement "before first consulting the relevant files and making contact with the appropriate authorities".
Click here to see examples of works from the collection.