The 21-year-old has joined the Tigers for a month as a stop-gap replacement for Rangi Chase, who starts a two-match ban imposed for a reckless tackle on Leeds full-back Zak Hardaker in last Sunday's 14-12 win over the champions.
O'Brien has been unable to force his way into the Wolves team so far this season and played on a dual-registration for Championship club Swinton last weekend. He had a month's loan with Widnes last season.
Castleford coach Ian Millward said: "I have been an admirer of Gareth's for some time and Tony Smith speaks highly of him as both a person and a player.
"Warrington currently have no injuries in their half-backs so they were happy to loan him out and give him some good playing experience."
Millward has included goalkicking three-quarter Kirk Dixon in his 19-man squad after recovering quicker than expected from a calf tear.
- Sports & Recreation
- Zak Hardaker
- Rangi Chase
- Ian Millward