Gilbert agreed to the deal Friday night after meeting with Texas coach Charlie Strong, athletic director Mike Perrin and UT president Greg Fenves. Perrin and Fenves flew to Tulsa with Strong to complete the deal after talks broke down Friday afternoon and Gilbert turned down Strong's initial offer.
Details of the agreement weren't immediately available.
At Tulsa, Gilbert shared offensive coordinator duties with Matt Mattox and coached quarterbacks and receivers under first-year coach Philip Montgomery. Mattox, Tulsa's offensive line coach, is expected to join Gilbert in Austin.
On Friday, multiple reports had Gilbert initially ready to accept the job, only to reverse course and stay with the Golden Hurricane. Strong initially interviewed TCU co-offensive coordinator Sonny Cumbie, who turned down an offer from Texas to stay with the Horned Frogs.
Gilbert was the co-offensive coordinator at Tulsa but wasn't the lead playcaller. Tulsa (6-6) faces Virginia Tech (6-6) in the Dec. 26 Camping World Independence Bowl.
California offensive coordinator Tony Franklin reportedly had been in the mix as a candidate, as well.
Earlier Friday, after reports surfaced that Gilbert turned down Texas, Fenves tweeted his full support for Strong, adding, "I am committed to helping him move Longhorn Football forward."
Perrin, who was initially brought on as interim athletic director in September and given the permanent job earlier this month, also has stated full support for Strong.
A university spokesman said Fenves felt compelled to respond after reports and fan reaction on websites started blaming school administrators for Strong's difficulty revamping his staff.
Strong will get "whatever he needs to bring in the right coaching staff," university spokesman Gary Susswein said without elaborating.
Next season, Strong will be in the third year of a five-year contract that pays more than $5 million per year. He has been interviewing candidates for offensive coordinator to rejuvenate one of the worst offenses in the Big 12. He stripped offensive coordinators Shawn Watson and Joe Wickline of their play-calling duties after one game this season. Receivers coach Jay Norvell called plays for the final 11 games of Texas' 5-7 season.
Since playing for the national title after the 2009 season, Texas is 41-35. Strong is 11-14 in two seasons.
The Associated Press contributed to this report.