If you have an unlocked iPhone, then you can buy a prepaid sim from one of the many UK mobile operators. It should automatically roam in Dublin as well (although you will incur a roaming charge in Dublin).
It would probably be cheaper to do that than to pay the roaming charges with your existing provider, unless you have a very well-priced roaming arrangement.