As an England selector, Gatting served his club and country nobly for 127 minutes and 86 balls after Warne had spun out the Middlesex openers, Paul Weekes and Jason Pooley, with his second and seventh deliveries.
Five overs later, Australia's leg-break wizard turned a ball sharply out of the rough to have Mark Ramprakash taken behind by Ian Healy. When the precocious Owais Shah went lbw first ball to Mike Kasprowicz, Middlesex were 72 for 4, still 55 behind with more than two hours of the match remaining.
Weekes (28) struck back a return catch in Warne's first over and Pooley (20) was bamboozled and bowled in his next. But Gatting entered, spirits in good order after his first-innings 85, and settled in to drive and sweep his way to 47, adding 84 with Keith Brown at a run a minute.
Their haste was tactically sound as every run Middlesex scored pushed victory further beyond Australia. Gatting eventually departed lbw to Steve Waugh, and Keith Dutch was bowled by brother Mark, but Brown (48 not out in 116 minutes) saw Middlesex to safety at 201 for 6, helped by some beefy blows from Richard Johnson (27 not out).
Earlier, Mark Waugh motored on from his overnight 100 to 142 not out, striking some spectacular shots off Dutch's off spin. He planted three sixes in the mid-wicket area in a form-building stay of 209 minutes and 203 balls (four sixes, 18 fours).
Warne struck 39 in a stand of 89 with Waugh before the Australian captain, Mark Taylor, declined the chance of any further batting practice before Headingley and declared at 432 for 7, following the addition of 81 in 17 overs and 77 minutes.
MIDDLESEX - First innings 305 (M W Gatting 85, M R Ramprakash 76; G D McGrath 4-61).
AUSTRALIA - First innings
(Ovrenight: 351 for 6).
M E Waugh not out 142
S K Warne c Pooley b Dutch 39
Extras (b2, lb10, w1, nb10) 23
Total (for 7 dec, 116 overs) 432
Fall (contd): 7-432.
Did not bat: J N Gillespie, G D McGrath, M S Kasprowicz.
Bowling: Fraser 29-6-115-0; Bloomfield 17-1-57-1; Johnson 17-2-63-1; Tufnell 38-8-106-2; Dutch 15-3-79-3.
MIDDLESEX - Second Innings
P N Weekes c & b Warne 28
J C Pooley b Warne 20
*M R Ramprakash c Healy b Warne 16
M W Gatting lbw b S R Waugh 47
O A Shah lbw b Kasprowicz 0
K R Brown not out 48
K P Dutch b M E Waugh 4
R L Johnson not out 27
Extras (b4, lb5, nb2) 11
Total (for 6, 59 overs) 201
Fall: 1-45, 2-50, 3-71, 4-72, 5-156, 6-163.
Did Not Bat: A R C Fraser, P C R Tufnell, T F Bloomfield.
Bowling: McGrath 11-3-37-0; Gillespie 13-6-32-0; Warne 16-4-55-3; Kasprowicz 6-1-10-1; M E Waugh 7-1-37-1; S R Waugh 5-2-13-1; Elliott 1-0-8-0.
Umpires: A A Jones and A G T Whitehead.Reuse content