Since the specific iMac G5 model was not provided - you may have 'Panther' (MacOS X 10.3.5) or 'Tiger' (up to MacOS X 10.4.2), by default, installed.
Thus, if 'Panther' is installed - select 'System Preferences' (via the 'Apple, System Preferences...' menu item, or from the '/Applications/' folder) 'Accounts' utility's 'Startup Items' tab. Then locate and select 'iTunes' in the list, and then click on the '-' icon button.
As stated by Gig', if 'Tiger' is installed - select 'System Preferences' 'Accounts' utility's 'Login Items' tab. Then locate and select 'iTunes' in the list, and then click on the '-' icon button.