No, it’s not a lighthouse...
It's the former Northern Lighthouse Board Depot
Although sometimes mistaken for a lighthouse, this was actually the depot for the Northern Lighthouse Board (NLB). The Board was responsible for maintaining all the lighthouses in Scotland. Supplies for the lighthouses were stored at the depot, and taken by boat to the various lighthouses by vessels which the Board owned. The lantern on top of the building, similar to a real lighthouse, was used for training and to test lights before they were put into in service.
Granton served as the base for the NLB vessels from 1874. Depot services in this area were moved to Leith in 1975, but are now concentrated on Oban.
There was a real lighthouse at Granton, at the end of the Middle Pier as shown on this map, which has since been replaced by a new lighthouse.