Fr Paul Murphy, who is in his 50s, was taken to University Hospital Galway and his injuries are described as serious but not life-threatening.
In a Facebook post, the chaplain with the Irish Defence Forces thanked the public for their prayers and said he was awaiting surgery.
Gardaà (Irish police) said a teenage boy was restrained by soldiers and then arrested. They also said a terror motivation was one line of enquiry.
The special detective unit is involved in the investigation.
“At this time it is not believed this incident is part of a wider conspiracy,” police added.
The Defence Forces said shots were fired by personnel during the incident.
“Soldiers on duty responded to the immediate threat with appropriate force to ensure the safety of personnel and secure the area,” they said.
“The assailant was quickly detained and handed over to An Garda SÃochána.
“The injured Defence Forces member was provided with immediate first aid at the scene before being transported to hospital for further treatment.”
Members of the Garda’s armed support unit were also sent to the incident on Thursday night.
Taoiseach (Irish prime minister) Simon Harris has described the incident as “shocking”.
“My thoughts are with the member of the Defence Forces in hospital. I want to thank the Defence Forces and gardaà for their action and response,” he said.
Tánaiste (Irish deputy prime minister) and Minister for Defence Micheál Martin condemned the attack.
“I commend the members of the Defence Forces on duty at the time, whose intervention was critical.
“Our thoughts are with the Defence Forces member injured in the attack.”
Justice Minister Helen McEntee said her “first thoughts are with Fr Paul Murphy” and she wished him a speedy recovery.