Documents published with the Autumn Statement forecast a rise in the price of both oil and gas of 10-15%, generating bigger taxable profits for offshore operators.
The independent body predicts nearly Â£6bn revenue over the next four years.
In March, it forecast a tax allowance giveaway by the Treasury of Â£4bn.
The main factor in its revised forecast has been a faster than expected rise in dollar oil prices.
At the end of October oil prices averaged $50.8 a barrel, 32% higher than the assumption it made in drawing up its March forecasts.
The OBR now expects prices to make a slow recovery to $44 a barrel next year, and to about $60 a barrel in 2022.
But that is still significantly lower than its March 2014 forecast, prior to the oil price crash, of about $100 a barrel, the OBR report points out.
The OBR has also revised up its estimates of production, reflecting recent investment in the sector.
"We now assume that oil production will be flat until 2019 (rather than until 2018) partly reflecting returns on high levels of capital expenditure over the past few years," it said.
The report says the fall in the value of the pound since the Brexit vote has led to higher Sterling oil prices, increasing revenue for the Treasury.
In the current financial year it still expects petroleum revenue tax repayments to more than offset receipts from corporation tax but from 2017 onwards it predicts a surplus, reaching Â£2.5bn by 2020.
Revenue from oil and gas tax is expected to rise over the next four years, according to the Office for Budget Responsibility.