The league and Irish Cup winners had to come from behind after Josh Carson slotted in against his former club to put the Bannsiders in front.
Linfield were quickly level when Aaron Burns fired home after a one-two with Jordan Stewart.
Andrew Mitchell volleyed in to make it 2-1 in the second half and a Paul Smyth lob sealed success for the Blues.
Burns headed wide from the first opening before Darren McAuley volleyed just off-target for beaten Irish Cup finalists Coleraine.
Jamie McGonigle created the opener, his run and delivery across the face of goal setting up midfielder Carson to net on 33 minutes.
Burns equalised four minutes later after a classy move with former Glentoran player Stewart.
Blues keeper Roy Carroll made good save to keep out an Aaron Traynor snapshot early in the second half.
Two goals in five minutes ensured the first silverware of the 2017/18 campaign was destined for Windsor Park.
New signing Andrew Mitchell connected with Kirk Millar's cross at the backpost to give David Healy's side the lead after 73 minutes.
Millar also set up the third, his throughball putting Smyth clear and the forward lifted the ball over Chris Johns and into the Coleraine net.
Linfield started the season by securing a 3-1 victory over Coleraine in the Charity Shield game at the Oval.