Grosvenor Casinos appealed to the sheriff court after being consistently refused permission for the 17 million complex on the site of the former Mecca Bingo Hall and Palais de Danse.
Last week, Sheriff Gordon Liddle condemned licensing chiefs for rejecting the original application and ordered the city council to pay the legal bill, thought to be around 50,000.
The ruling led councillors on the licensing board to finally approve the scheme yesterday.
It means Grosvenor can now start work on demolishing the former bingo hall and replacing it with a new casino complex, which will include a new cafe, sports bar and poker room.
Grosvenor's sister company, Mecca, first won permission to knock down the building beside the Union Canal last June and replace it with a casino. But licensing chiefs refused Grosvenor a licence three times on the grounds that the city has enough gambling establishments. The company mounted the successful court appeal after its most recent application was rejected in October.
Lawyers for the firm argued at the meeting yesterday that the new casino would be "very different" from other city gambling facilities. It will also cater for "low-cost" gamblers by running a series of 50p bet nights and free casino sessions.
Lawyers for rival casino chain Gala had argued that there was no justification to build an extra casino in the city, as there was "insufficient demand" for more gambling facilities in Edinburgh.
They added that there was also no need for another casino in the area as a new facility had recently opened at nearby FountainPark - which was only granted approval after operators Stanley Casinos agreed to close down one of their other city premises and transfer the licence to their new casino.
But new licensing board chair Councillor Marjorie Thomas said she thought there was sufficient demand. She added that the board should "use its discretion" and grant the licence, as it would provide extra competition for the city's casino industry.
Her thoughts were echoed by other members of the board, who expressed concerns that Stanley had built up a monopoly in Edinburgh, as they operate three of the city's four casinos.
But Councillor Alastair Paisley was not convinced. He said: "I am not satisfied that there is an unmet demand for casinos in Edinburgh and we should not be encouraging people to gamble."
Councillors decided by six votes to two to approve Grosvenor's application. But under new legislation, the firm will have to apply for another licence when the complex is completed - as the one granted yesterday only covers the existing building.