An inflationary gap occurs when the actual output of an economy exceeds its potential output, leading to upward pressure on prices. This situation arises when aggregate demand surpasses aggregate supply, causing businesses to increase production beyond sustainable levels, which can result in inflation. The gap indicates that the economy is operating above its long-term capacity, often linked to increased consumer spending, government expenditure, or investment.