The incident happened at a branch of Royal Bank of Scotland in Home Street in the Tollcross area of the capital at lunchtime yesterday.
Shoppers and local residents looked on as a police cordon was placed around the area as the investigation got under way shortly after 12:30pm.
It is understood that the gang was later apprehended in Howdenhall Road in the south of the city.
Detective Inspector Stuart Harkness said: “Police were called to a report of a robbery at RBS in Tollcross. A number of armed men entered the building and demanded cash.
“No-one was injured during this incident, however this was a frightening and intimidating experience for the staff and members of public at the branch.”
An RBS spokesman said: “We can confirm a incident took place at our Tollcross branch in Edinburgh. We are co-operating with the police.”
Police have appealed for anyone with information, or who witnessed this robbery, to contact them.