The attacker has been named locally as Mohammad Daleel, 27, a failed asylum seeker who was facing deportation to Bulgaria when he detonated his device after being turned away from a music festival.
The terror group claimed responsibility for the attack, saying the bloodshed was carried out by “one of the soldiers of the Islamic State”.
The blast killed the suspect and injured 15 others, four of them seriously.
Bavarian interior minister Joachim Herrmann said a video had been found of Daleel announcing a “revenge” attack against Germany and pledging allegiance to the leader of IS.
He added that it suggested the bombing, which happened outside a wine bar in central Ansbach on Sunday evening, was a “terrorist attack”.
Daleel repeatedly received psychiatric treatment, including for attempted suicide, and was known to authorities for minor drug offences.
The teenage gunman who slaughtered nine people in Munich on Friday had also been treated for a range of psychiatric problems in the lead-up to his attack, but had no known links to terrorism.
Germany has been reeling from four violent attacks in recent days, including three in Bavaria alone, following an IS-inspired axe rampage by a teenager on Monday, 18 July.
Bomb-making materials were found alongside violent videos at the home of the Ansbach bomber, officials said.
Storage devices containing “Salafist content” were also seized at the property.
It is thought the attacker was carrying the bomb in a rucksack which contained sharp bits of metal, and Roman Fertinger, the deputy police chief in nearby Nuremberg, said it was likely there would have been more casualties if he had not been barred from the festival. The nearby event was evacuated of more than 2,500 people following the explosion.
Bavaria police said security at three-day Ansbach Open music festival, around 90 miles north of Munich, noticed a young man acting suspiciously in the area at around 9:45pm.
He was turned away from the event for not having a ticket and at around 10:10pm he bent forward and the device was detonated.
Bystanders thought there had been a gas explosion at a nearby restaurant in the aftermath of the blast.
The suspect had received two deportation notices.