The air is coming from the intestine. Gallstone ileus happens when there is a fistula between the intestine and the gall bladder. A stone from the gall bladder moves through the fistula into the intestine and blocks it, usually at the ileocecal junction, creating the ileus. However, since there is the fistula, air from the intestine will move through the fistula into the biliary system, giving you the convenient "air in the bililary tree" sign.