The raiders used smoke grenades to "create a general atmosphere of panic and confusion", said Martin Heslop QC, prosecuting.
One of them also had stink bombs which they planned to use to "facilitate an impression that some noxious substance was being used in order to keep people away", he added.
But armed police swooped and arrested the gang as they tried to break through the three-quarter inch armoured plated glass vault containing the Millennium Star and the Millennium Blue Diamonds.
The police had taken extra security precautions at the Dome on 7 November last year, suspecting there would be a raid.
Mr Heslop said: "Arrangements were made to keep children away from the danger area.
"But for obvious security reasons it was not practicable to alert all staff to the possibility of an attack.
The court was told there were almost 40 specialist firearms officers secretly positioned in the Dome itself.
Disguises
There were also 60 armed Flying Squad officers positioned north and south of the River Thames and 20 armed officers on the river itself.
In addition there were surveillance officers were employed on foot in the area right next to the vault, dressed as Dome employees.
In the dock are Kevin Meredith, 34, from Brighton, East Sussex; Wayne Taylor, 35, of Tonbridge, Kent; Aldo Ciarrocchi, 31, from Bermondsey, and Mr Cockran, 48, of Catford, both south-east London; Robert Adams, 57, and Raymond Betson, 39, of no fixed address.
They all deny conspiracy to rob.
Mr Heslop told the court that the attack started at about 0930GMT.
Sledgehammers
The gang allegedly smashed their way into the Dome with a JCB digger, equipped with a giant mechanised shovel. It stopped outside the diamond exhibition.
The prosecution alleges that Mr Betson was driving the JCB. It says the other three men jumped out and Mr Adams and Mr Cockran went inside the diamond exhibition carrying sledgehammers and the nail gun.
Mr Ciarrocchi remained outside, the court heard. He allegedly threw smoke grenades across the floor to keep away visitors and staff.
As Mr Cockran and Mr Adams were inside, police from the Special Firearms Branch moved in on the gang.
"They did not stand on ceremony. All four were immobilised and arrested as quickly as possible," Mr Heslop said.
As Mr Adams was restrained, he allegedly told officers: "I was 12 inches from pay day..."
The raiders planned to get away by high powered speedboat across the Thames, allegedly driven by Mr Meredith, the court was told.
He was arrested by the river police as he waited by the Millennium Pier, Mr Heslop said.
The Millennium Star and the Millennium Blue Diamonds are worth £200m and are some of the rarest and finest diamonds in the world.