A late Callum McGregor strike in Iceland put the Scottish champions 1-0 up heading into Tuesday night's return leg at Murrayfield.
Celtic Park is being used for the Commonwealth Games but the Hoops will fancy progressing to the next stage in Edinburgh after dominating the first meeting.
St Pat’s almost recorded a shock result in midweek after taking the lead through Christy Fagan in the 38th minute, but Legia equalised in added time through Miroslav Radovic to save some embarrassment for Poland's champions.
The second leg will go ahead on Wednesday at Tallaght Stadium in Dublin.
The third qualifying round games are scheduled to be played on July 29/30 and August 5/6.