Mohammad Farooq is also accused of carrying out “hostile reconnaissance” at an RAF base.
A man has appeared in court accused of carrying a viable bomb to St James’s Hospital in Leeds.
Mohammed Farooq is charged with engaging in the preparation of an act of terrorism, and explosive and firearms offences.
The 27-year-old, of Hetton Road, Roundhay, Leeds, did not enter a plea at Westminster Magistrates’ Court.
Mr Farooq was remanded in custody to appear at the Central Criminal Court on 3 February.
Prosecutors allege Mr Farooq, a student nurse at St James’s Hospital, was found with a pressure cooker bomb outside the maternity ward of the hospital on 20 January.
They also argue that, inspired by radical Islam, he carried out “hostile reconnaissance” of an RAF base in Yorkshire in January.
Mr Farooq was arrested outside a maternity ward at St James’s Hospital last Friday.
It is alleged he had constructed a viable bomb, containing 13.7kg of a homemade low-explosive mixture and a length of pyrotechnic fuse.
Prosecutors added he also had an imitation firearm on him, a Gediz 9mm P.A.K semi-automatic pistol, at the time of his arrest.
They said he had been due to work a shift and had a grudge against a member of staff.
The incident prompted part of the hospital to be evacuated.
The defendant appeared via videolink, speaking only to confirm his name, date of birth and address.
He did not enter pleas to charges of engaging in conduct in preparation of an act of terrorism, possessing an imitation firearm and possession of an explosive substance with intent to endanger life or cause serious injury to property.
Follow BBC Yorkshire on Facebook, Twitter and Instagram. Send your story ideas to yorkslincs.news@bbc.co.uk.