Do you have access to the source code for the wordpress page? If you can see the source on the page and can confirm that it is the same as the code on the working page then it would indicate that there is some sort of compatibility issue in regards to the code that is on the wordpress page.
If you can see the source and see that the references are not there correctly then perhaps updating them will allow the gallery to work.
The gallery should be usable on any regular php page so long as the code for the includes is there and the files that are needed are there as well.