The PSNI say that seven or eight shots were fired at a stationary police car at Rossnareen Avenue in the Andersontown district.
Two officers who were in the car at the time were not injured during the attack which happened around 6.50 pm.
Police said the officers were carrying out duties in relation to recent serious crime in the area.
It is understood they were making inquiries into a murder bid last week on traveller Martin Gavin who was shot in the head in the Shaws Road area.
Two men, believed to have been carrying a machine gun, carried out the attack.
They later fled on foot.
A major security operation is now underway to try and track the gunmen.
Belfast police commander Chief Supt Nigel Grimshaw said detectives were treating the gun attack as attempted murder.
He said: “This was a mindless and reckless attempt to killer officers who were carrying out routine duties as part of an investigation into recent serious crime in the area.
“Thankfully this murder attempt failed, the two officers were badly shaken but were not physically injured,” he continued.
“Detectives have begun an investigation into this attempted murder and I would appeal to anyone in the community with information about the shooting to contact police on the non-emergency number 101.”