prayer for exam success
Commonly used for wishes or prayers at shrines and temples, especially for passing entrance exams.
I bought a charm for exam success at the shrine.
I sent my friend a message wishing them success on their exam.
合格 means 'passing an exam' itself, while 合格祈願 is the act of praying for that success.
祈願 is a general term for 'prayer' or 'supplication'; 合格祈願 specifies the purpose as exam success.
Compound of 合格 (passing an exam) and 祈願 (prayer).